mirror of
https://github.com/mpv-player/mpv
synced 2024-12-29 02:22:19 +00:00
5fb74d581f
Earlier, cs->locked was accessed outside the mutex to get around the problem that default pthread mutexes are not recursive (ie., you cannot do a double-lock from the same thread), causing a thread-safety problem, as both detected by Helgrind and showing up in some multithreaded codecs. The ideal solution here would be to simply use recursive pthread mutexes, but there were concerns about reduced debuggability and possibly portability. Thus, instead, rewrite the critical sections to be a simple lock count (with owner) protected by a regular mutex. Whenever a thread wants to enter the critical section and lock_count is not 0, it sleeps on a special event that tells it when the critical section is available. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30837 b3059339-0415-0410-9bf9-f77b7e298cf2 |
||
---|---|---|
.. | ||
dmo | ||
dshow | ||
qtx | ||
wine | ||
afl.c | ||
com.h | ||
debug.h | ||
drv.c | ||
drv.h | ||
elfdll.c | ||
ext.c | ||
ext.h | ||
ldt_keeper.c | ||
ldt_keeper.h | ||
loader.h | ||
module.c | ||
pe_image.c | ||
pe_resource.c | ||
qt_comp.h | ||
qt_fv.h | ||
registry.c | ||
registry.h | ||
resource.c | ||
vfl.c | ||
win32.c | ||
win32.h | ||
wineacm.h | ||
wrapper.h | ||
wrapper.S |