Commit Graph

3 Commits

Author SHA1 Message Date
Carlos O'Donell
042e1521c7 Fix semaphore destruction (bug 12674).
This commit fixes semaphore destruction by either using 64b atomic
operations (where available), or by using two separate fields when only
32b atomic operations are available.  In the latter case, we keep a
conservative estimate of whether there are any waiting threads in one
bit of the field that counts the number of available tokens, thus
allowing sem_post to atomically both add a token and determine whether
it needs to call futex_wake.

See:
https://sourceware.org/ml/libc-alpha/2014-12/msg00155.html
2015-01-21 00:46:16 -05:00
Ulrich Drepper
9c04f7c155 Fix aliasing problem in tst-sem11. 2009-10-30 09:35:20 -07:00
Ulrich Drepper
2af4e3e566 Test of semaphores. 2007-05-26 01:23:04 +00:00