glibc/sysdeps/nptl
Lucas A. M. Magalhaes 6185508101 nptl: Fix __futex_clocklock64 return error check [BZ #26964]
The earlier implementation of this, __lll_clocklock, calls lll_clockwait
that doesn't return the futex syscall error codes.  It always tries again
if that fails.

However in the current implementation, when the futex returns EAGAIN,
__futex_clocklock64 will also return EGAIN, even if the futex is taken.

This patch fixes the EAGAIN issue and also adds a check for EINTR.  As
futex syscall can return EINTR if the thread is interrupted by a signal.
In this case I'm assuming the function should continue trying to lock as
there is no mention to about it on POSIX.  Also add a test for both
scenarios.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2020-12-01 18:26:26 -03:00
..
bits
sys
aio_misc.h y2038: Convert aio_suspend to support 64 bit time 2020-11-30 14:08:44 +01:00
allocrtsig.c
dl-thread_gscope_wait.c nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
dl-tunables.list
fork.c
fork.h
futex-internal.c y2038: Convert aio_suspend to support 64 bit time 2020-11-30 14:08:44 +01:00
futex-internal.h nptl: Fix __futex_clocklock64 return error check [BZ #26964] 2020-12-01 18:26:26 -03:00
gai_misc.h
Implies
internaltypes.h nptl: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np 2020-06-02 11:59:18 +02:00
jmp-unwind.c
libc-lock.h
libc-lockP.h
librt-cancellation.c
lowlevellock-futex.h
lowlevellock.h nptl: Replace lll_timedwait with __futex_abstimed_wait64 2020-11-25 10:43:18 -03:00
Makeconfig
Makefile nptl: Add missing cancellation flags on futex_internal and pselect32 2020-10-07 15:24:04 -03:00
malloc-machine.h
proc_service.h
pthread-functions.h
pthread-offsets.h
pthread.h Avoid -Wstringop-overflow warning in pthread_cleanup_push macros 2020-10-30 22:25:42 +00:00
setxid.h
shm-directory.h
stdio-lock.h
Subdirs
tcb-offsets.h
thrd_create.c
thread_db.h
timer_routines.h
tst-mqueue8x.c
unwind-forcedunwind.c