glibc/sysdeps/unix/sysv/linux/wordsize-64
Adhemerval Zanella c6bb095eb5 nptl: Rewrite cancellation macros
This patch changes the way cancellation entrypoints are defined to
instead call the macro SYSCALL_CANCEL.  An usual cnacellation definition
is defined as:

  if (SINGLE_THREAD_P)
    return INLINE_SYSCALL (syscall, NARGS, args...)

  int oldtype = LIBC_CANCEL_ASYNC ();

  return INLINE_SYSCALL (syscall, NARGS, args...)

  LIBC_CANCEL_RESET (oldtype);

And it is rewrited as just:

  SYSCALL_CANCEL (syscall, args...)

The idea is to remove LIBC_CANCEL_ASYNC/LIBC_CANCEL_RESET explicit
usage.

Tested on i386, x86_64, powerpc32, powerpc64le, arm, and aarch64.

	* sysdeps/unix/sysdep.h [SYSCALL_CANCEL]: New macro: define
	cancellable syscalls.
	(SYS_ify): Add guard to no redefine it.
	(INLINE_SYSCALL): Likewise.
	* sysdeps/unix/sysv/linux/accept4.c (accept4): Remove
	LIBC_CANCEL_ASYNC/INLINE_SYSCALL/LIBC_CANCEL_RESET and use
	SYSCALL_CANCEL instead.
	* sysdeps/unix/sysv/linux/alpha/fdatasync.c (__fdatasync): Likewise.
	* sysdeps/unix/sysv/linux/arm/pread.c (__libc_pread): Likewise.
	* sysdeps/unix/sysv/linux/arm/pread64.c (__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/arm/pwrite.c (__libc_pwrite): Likewise.
	* sysdeps/unix/sysv/linux/arm/pwrite64.c (__libc_pwrite64): Likewise.
	* sysdeps/unix/sysv/linux/epoll_pwait.c (epoll_pwait): Likewise.
	* sysdeps/unix/sysv/linux/fallocate.c (fallocate): Likewise.
	* sysdeps/unix/sysv/linux/fallocate64.c (fallocate64): Likewise.
	* sysdeps/unix/sysv/linux/generic/open.c (__libc_open): Likewise.
	* sysdeps/unix/sysv/linux/generic/open64.c (__libc_open64): Likewise.
	* sysdeps/unix/sysv/linux/generic/pause.c (__libc_pause): Likewise.
	* sysdeps/unix/sysv/linux/generic/poll.c (__poll): Likewise.
	* sysdeps/unix/sysv/linux/generic/recv.c (__libc_recv): Likewise.
	* sysdeps/unix/sysv/linux/generic/select.c (__select): Likewise.
	* sysdeps/unix/sysv/linux/generic/send.c (__libc_send): Likewise.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c (__libc_pread):
	Likewise.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c
	(__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c
	(__libc_preadv): Likewise.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c
	(__libc_readv64): Likewise.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c
	(__libc_pwrite): Likewise.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c
	(__libc_pwrite64): Likewise.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c
	(__libc_pwritev): Likewise.
	* sysdeps/sysv/linux/generic/wordsize-32/pwritev64.c
	(__libc_pwritev64): Likewise.
	* sysdeps/unix/sysv/linux/i386/fcntl.c (__libc_fcntl): Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
	(sync_file_range): Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c (fallocate):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c (fallocate64):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/pread.c (__libc_pread): Likewise.
	* sysdeps/unix/sysv/linux/mips/pread64.c (__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Likewise.
	* sysdeps/unix/sysv/linux/mips/pwrite64.c (__libc_pwrite64): Likewise.
	* sysdeps/unix/sysv/linux/msgrcv.c (__libc_msgrcv): Likewise.
	* sysdeps/unix/sysv/linux/msgsnd.c (__libc_msgsnd): Likewise.
	* sysdeps/unix/sysv/linux/open64.c (__libc_open64): Likewise.
	* sysdeps/unix/sysv/linux/openat.c (__libc_openat): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c (__libc_pread):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
	(__libc_read64): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c (__libc_write):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c (__libc_write64):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c (__libc_fcntl):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c (__libc_pread):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c
	(__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c (__libc_pwrite):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c
	(__libc_pwrite64): Likewise.
	* sysdeps/sysv/linux/powerpc/powerpc64/sync_file_range.c
	(sync_file_range): Likewise.
	* sysdeps/unix/sysv/linux/ppoll.c (ppoll): Likewise.
	* sysdeps/unix/sysv/linux/pread.c (__libc_pread): Likewise.
	* sysdeps/unix/sysv/linux/pread64.c (__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/preadv.c (__libc_preadv): Likewise.
	* sysdeps/unix/sysv/linux/pselect.c (__pselect): Likewise.
	* sysdeps/unix/sysv/linux/pwrite.c (__libc_pwrite): Likewise.
	* sysdeps/unix/sysv/linux/pwrite64.c (__libc_pwrite64): Likewise.
	* sysdeps/unix/sysv/linux/pwritev.c (PWRITEV): Likewise.
	* sysdeps/unix/sysv/linux/readv.c (__libc_readv): Likewise.
	* sysdeps/unix/sysv/linux/recvmmsg.c (recvmmsg): Likewise.
	* sysdeps/unix/sysv/linux/sendmmsg.c (sendmmsg): Likewise.
	* sysdeps/unix/sysv/linux/sh/pread.c (__libc_pread): Likewise.
	* sysdeps/unix/sysv/linux/sh/pread64.c (__libc_pread64): Likewise.
	* sysdeps/unix/sysv/linux/sh/pwrite.c (__libc_pwrite): Likewise.
	* sysdeps/unix/sysv/linux/sh/pwrite64.c (__libc_pwrite64): Likewise.
	* sysdeps/unix/sysv/linux/sigsuspend.c (__sigsuspend): Likewise.
	* sysdeps/unix/sysv/linux/sigtimedwait.c (__sigtimedwait): Likewise.
	* sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c (__libc_msgrcv):
	Likewise.
	* sysdeps/unix/sysv/linux/sync_file_range.c (sync_file_range):
	Likewise.
	* sysdeps/unix/sysv/linux/tcdrain.c (__libc_tcdrain): Likewise.
	* sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
	Likewise.
	* sysdeps/unix/sysv/linux/wait.c (__libc_wait): Likewise.
	* sysdeps/unix/sysv/linux/waitid.c (__waitid): Likewise.
	* sysdeps/unix/sysv/linux/waitpid.c (__libc_waitpid): Likewise.
	* sysdeps/unix/sysv/linux/wordsize-64/fallocate.c (fallocate):
	Likewise.
	* sysdeps/unix/sysv/linux/wordsize-64/preadv.c (preadv): Likewise.
	* sysdeps/unix/sysv/linux/wordsize-64/pwritev.c (pwritev): Likewise.
	* sysdeps/unix/sysv/linux/writev.c (__libc_writev): Likewise.
	* sysdeps/unix/sysv/linux/x86_64/recv.c (__libc_recv): Likewise.
	* sysdeps/unix/sysv/linux/x86_64/send.c (__libc_send): Likewise.
2015-06-04 18:58:36 -03:00
..
aio_read64.c * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to.. 2007-11-10 19:36:06 +00:00
aio_read.c * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to.. 2007-11-10 19:36:06 +00:00
aio_write64.c * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to.. 2007-11-10 19:36:06 +00:00
aio_write.c * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to.. 2007-11-10 19:36:06 +00:00
creat64.c * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to.. 2007-11-10 19:36:06 +00:00
dl-fxstatat64.c Remove __ASSUME_ATFCTS conditionals in sysdeps/unix/sysv/linux/. 2014-06-20 15:41:35 +00:00
fallocate64.c * sysdeps/unix/sysv/linux/fallocate.c: New file. 2009-03-02 16:15:58 +00:00
fallocate.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
fstatfs64.c
fstatvfs64.c
fstatvfs.c
ftruncate64.c
fxstat64.c
fxstat.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
fxstatat64.c * io/Makefile (routines): Add fstatat, fstatat64, fxstatat, fxstatat64, 2005-11-11 20:02:07 +00:00
fxstatat.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getdents64.c
getdents.c Add space inf weak_alias use. 2005-05-26 14:30:51 +00:00
getdirentries64.c * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to.. 2007-11-10 19:36:06 +00:00
getdirentries.c * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to.. 2007-11-10 19:36:06 +00:00
getrlimit64.c
glob64.c Fix glob64 broken by cleanup. 2013-05-06 17:11:12 -07:00
internal_statvfs64.c
lio_listio64.c * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to.. 2007-11-10 19:36:06 +00:00
lio_listio.c * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to.. 2007-11-10 19:36:06 +00:00
lxstat64.c
lxstat.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mmap64.c
open64.c * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to.. 2007-11-10 19:36:06 +00:00
openat64.c * sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to.. 2007-11-10 19:36:06 +00:00
openat.c Consolidate definitions of _FORTIFY_SOURCE wrappers for open{,64}{,at}. 2013-05-03 16:33:26 -07:00
posix_fadvise64.c
posix_fadvise.c Fix wordsize-64 posix_fadvise64, posix_fallocate64 namespace (bug 17777). 2015-01-05 14:37:07 +00:00
posix_fallocate64.c * sysdeps/posix/posix_fallocate64.c: Undefine 2007-07-28 18:13:45 +00:00
posix_fallocate.c __ASSUME_FALLOCATE is always true on 32-bit architectures 2015-05-05 08:28:35 +02:00
pread64.c
preadv64.c * misc/Makefile (routines): Add preadv, preadv64, pwritev, pwritev64. 2009-04-03 19:57:16 +00:00
preadv.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
pwrite64.c
pwritev64.c * misc/Makefile (routines): Add preadv, preadv64, pwritev, pwritev64. 2009-04-03 19:57:16 +00:00
pwritev.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
readdir64_r.c
readdir64.c
readdir_r.c CVE-2013-4237, BZ #14699: Buffer overflow in readdir_r 2013-08-16 09:40:34 +02:00
readdir.c Move common dirent implementation from sysdeps/unix to sysdeps/posix. 2012-08-07 14:47:34 -07:00
sendfile64.c
setrlimit64.c
statfs64.c
statvfs64.c
statvfs.c
syscalls.list Fix posix_spawn getrlimit64 namespace (bug 17991). 2015-02-18 00:26:35 +00:00
truncate64.c
Versions Add missing export of fallocate64 on 32-bit platforms. 2009-05-15 21:00:09 -07:00
xstat64.c
xstat.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00