From: Andre Noll Date: Sun, 31 Mar 2013 14:58:18 +0000 (+0000) Subject: audiod: Avoid delay when closing slot. X-Git-Tag: v0.4.13~39^2~44 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=5bb44a414084464f133beb8810027a18b4254d1f;hp=5bb44a414084464f133beb8810027a18b4254d1f;p=paraslash.git audiod: Avoid delay when closing slot. Currently we might wait up to a full scheduler interval until a slot is closed. This commit changes the pre_select method of the status task to check whether some slot can be closed. In this case it requests a minimal delay from the scheduler. The current try_to_close_slot() is split into two functions, must_close_slot() and close_unused_slots(). The former function is called from ->pre_select(). It only checks whether a slot must be closed but performs no action. The latter function, close_unused_slots() probes all slots and closes those for which must_close_slot() returns true. ---