glibc/sysdeps/unix/sysv/linux/x86_64
Adhemerval Zanella ce7eb0e903 nptl: Cleanup cancellation macros
This patch wraps all uses of *_{enable,disable}_asynccancel and
and *_CANCEL_{ASYNC,RESET} in either already provided macros
(lll_futex_timed_wait_cancel) or creates new ones if the
functionality is not provided (SYSCALL_CANCEL_NCS, lll_futex_wait_cancel,
and lll_futex_timed_wait_cancel).

Also for some generic implementations, the direct call of the macros
are removed since the underlying symbols are suppose to provide
cancellation support.

This is a priliminary patch intended to simplify the work required
for BZ#12683 fix.  It is a refactor change, no semantic changes are
expected.

Checked on x86_64-linux-gnu and i686-linux-gnu.

	* nptl/pthread_join_common.c (__pthread_timedjoin_ex): Use
	lll_wait_tid with timeout.
	* nptl/sem_wait.c (__old_sem_wait): Use lll_futex_wait_cancel.
	* sysdeps/nptl/aio_misc.h (AIO_MISC_WAIT): Use
	futex_reltimed_wait_cancelable for cancelabla mode.
	* sysdeps/nptl/gai_misc.h (GAI_MISC_WAIT): Likewise.
	* sysdeps/posix/open64.c (__libc_open64): Do not call cancelation
	macros.
	* sysdeps/posix/sigwait.c (__sigwait): Likewise.
	* sysdeps/posix/waitid.c (__sigwait): Likewise.
	* sysdeps/unix/sysdep.h (__SYSCALL_CANCEL_CALL,
	SYSCALL_CANCEL_NCS): New macro.
	* sysdeps/nptl/lowlevellock.h (lll_wait_tid): Add timeout argument.
	(lll_timedwait_tid): Remove macro.
	* sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_wait_tid):
	Likewise.
	(lll_timedwait_tid): Likewise.
	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_wait_tid):
	Likewise.
	(lll_timedwait_tid): Likewise.
	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_wait_tid):
	Likewise.
	(lll_timedwait_tid): Likewise.
	* sysdeps/unix/sysv/linux/clock_nanosleep.c (__clock_nanosleep):
	Use INTERNAL_SYSCALL_CANCEL.
	* sysdeps/unix/sysv/linux/futex-internal.h
	(futex_reltimed_wait_cancelable): Use LIBC_CANCEL_{ASYNC,RESET}
	instead of __pthread_{enable,disable}_asynccancel.
	* sysdeps/unix/sysv/linux/lowlevellock-futex.h
	(lll_futex_wait_cancel): New macro.
2019-01-03 18:38:16 -02:00
..
64 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
x32 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
__start_context.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
brk.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
cancellation.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
clone.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
compat-timer.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
configure
configure.ac
dl-cache.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
dl-procinfo.c
dl-procinfo.h x86: Set dl_platform and dl_hwcap from CPU features [BZ #21391] 2017-05-03 13:44:35 -07:00
get_clockfreq.c
getcontext.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
Implies
init-first.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ipc_priv.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
kernel_stat.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
kernel-features.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ldconfig.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ldd-rewrite.sed
libc-cancellation.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
libc-lowlevellock.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
libmvec.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
librt-cancellation.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
lll_timedlock_wait.c
lll_timedwait_tid.c
lowlevellock.h nptl: Cleanup cancellation macros 2019-01-03 18:38:16 -02:00
lowlevellock.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
makecontext.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
Makefile
profil-counter.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
pthread_setaffinity.c
readelflib.c
register-dump.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sched_setaffinity.c
setcontext.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sigaction.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sigaltstack-offsets.sym
sigcontextinfo.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sigprocmask.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
swapcontext.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
syscall.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
syscalls.list Remove p{read,write}{v} and fallocate from x86 auto-generation list 2017-08-22 17:27:18 -03:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sysdep.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
timer_create.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
timer_delete.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
timer_getoverr.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
timer_gettime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
timer_settime.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ucontext_i.sym x86-64/CET: Extend ucontext_t to save shadow stack 2018-07-25 06:37:31 -07:00
Versions
vfork.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00