]> git.tuebingen.mpg.de Git - paraslash.git/commit
audiod: Avoid delay when closing slot.
authorAndre Noll <maan@systemlinux.org>
Sun, 31 Mar 2013 14:58:18 +0000 (14:58 +0000)
committerAndre Noll <maan@systemlinux.org>
Wed, 17 Apr 2013 20:15:46 +0000 (22:15 +0200)
commit5bb44a414084464f133beb8810027a18b4254d1f
treeaedc5727b91be021db4da6bfc4c83ac848510add
parent29921a5e29530801697ce4e4773738404efcbf57
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.
audiod.c