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
Thomas Schwinge 48aff7765b Fix 9554ebf2d4.
| Invalid timeouts in i386 sem_timedwait.
|
| We adjusted nwaiters even though this isn't necessary.
2012-03-08 09:33:12 +01:00
Ulrich Drepper fa214705b9 Once again forgot to add new test file. 2009-11-24 18:22:30 -08:00