[PATCH] Fix race between sem_post and semaphore destruction [BZ #12674]

Siddhesh Poyarekar siddhesh.poyarekar@gmail.com
Thu May 22 03:11:00 GMT 2014


On 22 May 2014 07:41, Rich Felker <dalias@libc.org> wrote:
> BTW the other confusing case I seem to remember is that waiters can
> decrement without the semaphore value decrementing, as a result of
> EINTR or ETIMEDOUT. This *might* have an impact on the logic but I
> don't see right off how it would, and it's been a while since I put
> much thought into it.

I think resetting the value to 0 when there are no waiters covers
this, since that would only have an impact when nwaiters is 0 and the
semaphore value stayed as -1.

Siddhesh
-- 
http://siddhesh.in



More information about the Libc-alpha mailing list