diff options
Diffstat (limited to 'nptl/sem_post.c')
-rw-r--r-- | nptl/sem_post.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/nptl/sem_post.c b/nptl/sem_post.c index b6d30b5..06d8359 100644 --- a/nptl/sem_post.c +++ b/nptl/sem_post.c @@ -20,37 +20,13 @@ #include <atomic.h> #include <errno.h> #include <sysdep.h> -#include <lowlevellock.h> +#include <lowlevellock.h> /* lll_futex* used by the old code. */ +#include <futex-internal.h> #include <internaltypes.h> #include <semaphore.h> #include <shlib-compat.h> -/* Wrapper for lll_futex_wake, with error checking. - TODO Remove when cleaning up the futex API throughout glibc. */ -static __always_inline void -futex_wake (unsigned int* futex, int processes_to_wake, int private) -{ - int res = lll_futex_wake (futex, processes_to_wake, private); - /* No error. Ignore the number of woken processes. */ - if (res >= 0) - return; - switch (res) - { - case -EFAULT: /* Could have happened due to memory reuse. */ - case -EINVAL: /* Could be either due to incorrect alignment (a bug in - glibc or in the application) or due to memory being - reused for a PI futex. We cannot distinguish between the - two causes, and one of them is correct use, so we do not - act in this case. */ - return; - case -ENOSYS: /* Must have been caused by a glibc bug. */ - /* No other errors are documented at this time. */ - default: - abort (); - } -} - /* See sem_wait for an explanation of the algorithm. */ int |