summaryrefslogtreecommitdiffstats
path: root/options/m_config.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-05 13:37:28 +0200
committerwm4 <wm4@nowhere>2016-09-05 20:58:45 +0200
commit6cd80e972e12c6eeaa7bbfcb1e1e6f3342aae8c2 (patch)
treeff257712b68528eb6f4adc7e8ee0d55d1840d3ff /options/m_config.c
parent3878a59e2c2ecca25ea9c94d0082ed2df3d52796 (diff)
downloadmpv-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 'options/m_config.c')
0 files changed, 0 insertions, 0 deletions