clock: rework the wakeup of entries.
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 26 Mar 2009 17:46:35 +0000 (18:46 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 26 Mar 2009 17:53:02 +0000 (18:53 +0100)
commit16b68e7de01a3f20cc760ee7f0e5aeb3e171120e
tree27b9d01124b37cc84715ed2771deeb1adce0006d
parent31669a481961f91eca580b11035f288daf065ce4
clock: rework the wakeup of entries.

Keep a counter for the amount of outstanding wakeups that we produce and only
perform a write/read to the control socket when 1 or 0 respectively.
don't poll when waiting for the entries to be unblocked and clear their wakeup
counts, just act on the signal when the wakeup count is 0.
unscheduled entries will clear their wakeup count themselves.
Keep track of when we wakeup the async thread because the list of entries has
changed.
don't try to see if the list changed because we can't really know when one entry
is added multiple times.
Only wake up the async thread when we add an async entry to the head of the list
and the old entry was BUSY.
gst/gstsystemclock.c