[MPlayer-dev-eng] [PATCH] Fix semaphore behavior in WaitForSingleObject

Steinar H. Gunderson sgunderson at bigfoot.com
Thu Mar 4 17:25:54 CET 2010


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.

/* Steinar */
-- 
Homepage: http://www.sesse.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-semaphore-waitforsingleobject.diff
Type: text/x-diff
Size: 492 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100304/9c9f1524/attachment.diff>


More information about the MPlayer-dev-eng mailing list