[MPlayer-dev-eng] [PATCH] Fix semaphore behavior in WaitForSingleObject
Steinar H. Gunderson
sgunderson at bigfoot.com
Sat Mar 6 11:07:54 CET 2010
On Thu, Mar 04, 2010 at 05:25:54PM +0100, Steinar H. Gunderson wrote:
> Two simple bugfixes for semaphores in WaitForSingleObject:
>
> First, semaphore count should be decreased on loading the semaphore, not
> increased. The case for duration=0 had this wrong (duration=-1 was fine).
>
> Second, the code for duration=-1 forgot to set the return value, so it
> would always return WAIT_FAILED.
Committed to Subversion.
/* Steinar */
--
Homepage: http://www.sesse.net/
More information about the MPlayer-dev-eng
mailing list