diff options
author | wm4 <wm4@nowhere> | 2016-09-05 13:37:28 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-05 20:58:45 +0200 |
commit | 6cd80e972e12c6eeaa7bbfcb1e1e6f3342aae8c2 (patch) | |
tree | ff257712b68528eb6f4adc7e8ee0d55d1840d3ff /video/out/vo.h | |
parent | 3878a59e2c2ecca25ea9c94d0082ed2df3d52796 (diff) | |
download | mpv-6cd80e972e12c6eeaa7bbfcb1e1e6f3342aae8c2.tar.bz2 mpv-6cd80e972e12c6eeaa7bbfcb1e1e6f3342aae8c2.tar.xz |
dispatch: improve recent locking changes slightly
Instead of adding a lock_frame to the list when mp_dispatch_lock() is
called, just set a simple flag. This uses the fact that the lock is not
recursive, and can happen once per mp_dispatch_queue_process(). It
avoids the dynamic allocation, and makes error checking slightly
stricter.
Again, this is actually redundant and exists only for error-checking.
It'd actually need only a counter, because the actual locking is done by
"parking" the target thread in mp_dispatch_queue_process() and then
setting queue->idling=false. Only when mp_dispatch_unlock() sets it to
true again other work can proceed again. Document this too.
Diffstat (limited to 'video/out/vo.h')
0 files changed, 0 insertions, 0 deletions