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 nptl: Move nptl-specific types to separate header 2020-02-09 13:56:48 +01:00
sys Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
aio_misc.h y2038: Convert aio_suspend to support 64 bit time 2020-11-30 14:08:44 +01:00
allocrtsig.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
dl-thread_gscope_wait.c nptl: Move stack list variables into _rtld_global 2020-11-16 19:33:30 +01:00
dl-tunables.list Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fork.c Linux: set_robust_list syscall number is always available 2020-03-03 12:49:44 +01:00
fork.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
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 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Implies Get rid of nptl/sysdeps/pthread/ subdirectory 2014-06-12 13:48:47 -07:00
internaltypes.h nptl: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np 2020-06-02 11:59:18 +02:00
jmp-unwind.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
libc-lock.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
libc-lockP.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
librt-cancellation.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
lowlevellock-futex.h linux: Remove INTERNAL_SYSCALL_DECL 2020-02-14 21:12:45 -03:00
lowlevellock.h nptl: Replace lll_timedwait with __futex_abstimed_wait64 2020-11-25 10:43:18 -03:00
Makeconfig Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Makefile nptl: Add missing cancellation flags on futex_internal and pselect32 2020-10-07 15:24:04 -03:00
malloc-machine.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
proc_service.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pthread-functions.h nptl: Move pthread_setschedparam implementation into libc 2020-02-20 08:57:01 +01:00
pthread-offsets.h nptl: update default pthread-offsets.h 2020-02-10 17:01:21 +01:00
pthread.h Avoid -Wstringop-overflow warning in pthread_cleanup_push macros 2020-10-30 22:25:42 +00:00
setxid.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
shm-directory.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
stdio-lock.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Subdirs Get rid of nptl/sysdeps/pthread/ subdirectory 2014-06-12 13:48:47 -07:00
tcb-offsets.h Get rid of nptl/sysdeps/pthread/ subdirectory 2014-06-12 13:48:47 -07:00
thrd_create.c C11 threads: Move implementation to sysdeps/pthread 2020-02-09 13:56:48 +01:00
thread_db.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
timer_routines.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
tst-mqueue8x.c Get rid of nptl/sysdeps/pthread/ subdirectory 2014-06-12 13:48:47 -07:00
unwind-forcedunwind.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00