Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Also use uint64_t in __new_sem_wait_fast | H.J. Lu | 2015-01-23 | 1 | -1/+1 |
| | |||||
* | Use uint64_t and (uint64_t) 1 for 64-bit int | H.J. Lu | 2015-01-23 | 1 | -5/+5 |
| | | | | | | | | | | | | | | | This patch replaces unsigned long int and 1UL with uint64_t and (uint64_t) 1 to support ILP32 targets like x32. [BZ #17870] * nptl/sem_post.c (__new_sem_post): Replace unsigned long int with uint64_t. * nptl/sem_waitcommon.c (__sem_wait_cleanup): Replace 1UL with (uint64_t) 1. (__new_sem_wait_slow): Replace unsigned long int with uint64_t. Replace 1UL with (uint64_t) 1. * sysdeps/nptl/internaltypes.h (new_sem): Replace unsigned long int with uint64_t. | ||||
* | Fix semaphore destruction (bug 12674). | Carlos O'Donell | 2015-01-21 | 1 | -0/+467 |
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 |