diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2009-03-15 21:37:06 +0100 |
---|---|---|
committer | Reinhard Nißl <rnissl@gmx.de> | 2009-03-15 21:37:06 +0100 |
commit | ee2fbe251bffe9f3db12cf448760cf2ff12dc634 (patch) | |
tree | 11494bf9b3d92632d04430034e543e7646c95e59 /m4 | |
parent | 3863a132e3e7dd0fe4aab68a811a9732717a217b (diff) | |
download | xine-lib-ee2fbe251bffe9f3db12cf448760cf2ff12dc634.tar.gz xine-lib-ee2fbe251bffe9f3db12cf448760cf2ff12dc634.tar.bz2 |
Fix thread starvation for xine_get_param() on multi-core systems.
ao_loop() called sched_yield() to give other threads a chance to acquire
driver->lock. But on multi-core systems, it takes too long to wake up the
acquiring thread so that ao_loop() takes driver->lock again before the
other threads had a chance to acquire it.
Therefore a cond var is introduced which ao_loop() can wait for. The
cond var will be signalled when one of the other threads has acquired
driver->lock. This prevents starvation.
Diffstat (limited to 'm4')
0 files changed, 0 insertions, 0 deletions