Mercurial > mplayer.hg
view debian/copyright @ 30795:1001c606f94c
Make emulated Win32 critical sections thread safe.
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.
author | sesse |
---|---|
date | Thu, 04 Mar 2010 15:57:08 +0000 |
parents | 32725ca88fed |
children |
line wrap: on
line source
This package was debianized by * TeLeNiEkO * telenieko@telenieko.com on Mon, 26 Feb 2001 12:24:04 +0100. Original source can be found at: http://www.mplayerHQ.hu/homepage/ Copyrighted by various authors. Licensed under the terms of GNU GPL. See /usr/share/common-licenses/GPL for details.