aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2015-11-12 14:01:36 -0200
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-08-24 14:58:35 -0300
commitebd6f0076a83bb25a9853773fbfbcff00b4c9a32 (patch)
tree07b02599002f24fd7fa37e1ddfa332f6a236ec99
parent8aa48656bb00074f3f422d805f15d07d786970ba (diff)
downloadglibc-ebd6f0076a83bb25a9853773fbfbcff00b4c9a32.tar.xz
glibc-ebd6f0076a83bb25a9853773fbfbcff00b4c9a32.zip
Remove cancellation support for syscall generation
This patch removes the cancellation mark from the auto-generation syscall script. Now all the cancellable syscalls are done throught C code using the SYSCALL_CANCEL macro. It simplifies the assembly required to each architecture port, since the SYSCALL_CANCEL uses the already defined INLINE_SYSCALL macros, and allows a more straigh fix on cancellation machanism (since no more specific assembly fixes will be required). Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.A Also with build-many-glibc.py with remaning touched architectures. * sysdeps/unix/make-syscalls.sh: Remove cancellable tagging for syscall definitions. * sysdeps/unix/syscall-template.S (SYSCALL_CANCELLABLE): Remove definition. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (__local_enable_asynccancel): Likewise. [IS_IN (libpthread)] (__local_disable_asynccancel): Likewise. [IS_IN (libc)] (__local_enable_asynccancel): Likewise. [IS_IN (libc)] (__local_enable_asynccancel): Likewise. [IS_IN (librt)] (__local_disable_asynccancel): Likewise. [IS_IN (librt)] (__local_disable_asynccancel): Likewise. (CENABLE): Likewise. (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Remove defintion. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Remove file. * sysdeps/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h: New file. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Remove file. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h: New file. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Remove definition. (PSEUDO_END): Likewise. [IS_IN (libpthread)] (CENABLE): Likewise. [IS_IN (libpthread)] (CDISABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (libc)] (CENABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [IS_IN (librt)] (CDISABLE): Likewise. [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
-rw-r--r--ChangeLog176
-rw-r--r--sysdeps/unix/make-syscalls.sh4
-rw-r--r--sysdeps/unix/syscall-template.S12
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h97
-rw-r--r--sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h139
-rw-r--r--sysdeps/unix/sysv/linux/arm/sysdep-cancel.h207
-rw-r--r--sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h235
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep-cancel.h129
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h203
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h115
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h126
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h249
-rw-r--r--sysdeps/unix/sysv/linux/mips/sysdep-cancel.h166
-rw-r--r--sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h117
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h118
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h147
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h36
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h115
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h117
-rw-r--r--sysdeps/unix/sysv/linux/sh/sysdep-cancel.h146
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h111
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h109
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h36
-rw-r--r--sysdeps/unix/sysv/linux/tile/sysdep-cancel.h130
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h74
25 files changed, 348 insertions, 2766 deletions
diff --git a/ChangeLog b/ChangeLog
index 8fb2105bf8..3521ed197d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,179 @@
+2017-08-24 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ * sysdeps/unix/make-syscalls.sh: Remove cancellable tagging for
+ syscall definitions and replace __builtin_expect with __glibc_likely.
+ * sysdeps/unix/syscall-template.S: Update comment about cancellable
+ syscall.
+ (SYSCALL_CANCELLABLE): Removedefinition
+ * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (__local_enable_asynccancel): Likewise.
+ [IS_IN (libpthread)] (__local_disable_asynccancel): Likewise.
+ [IS_IN (libc)] (__local_enable_asynccancel): Likewise.
+ [IS_IN (libc)] (__local_enable_asynccancel): Likewise.
+ [IS_IN (librt)] (__local_disable_asynccancel): Likewise.
+ [IS_IN (librt)] (__local_disable_asynccancel): Likewise.
+ (CENABLE): Likewise.
+ (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Remove
+ defintion.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h (PSEUDO):
+ Remove definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Remove file.
+ * sysdeps/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/sysdep-cancel.h: New file.
+ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Remove file.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h: New file.
+ * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Remove
+ definition.
+ (PSEUDO_END): Likewise.
+ [IS_IN (libpthread)] (CENABLE): Likewise.
+ [IS_IN (libpthread)] (CDISABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (libc)] (CENABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [IS_IN (librt)] (CDISABLE): Likewise.
+ [__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+
2017-08-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
* sysdeps/ieee754/dbl-64/Makefile: Don't override CFLAGS.
diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh
index 123553c1d9..042cfacfd2 100644
--- a/sysdeps/unix/make-syscalls.sh
+++ b/sysdeps/unix/make-syscalls.sh
@@ -12,7 +12,6 @@
#
# Syscall Signature Prefixes:
#
-# C: cancellable (i.e., this syscall is a cancellation point)
# E: errno and return value are not set by the call
# V: errno is not set, but errno or zero (success) is returned from the call
#
@@ -171,11 +170,9 @@ while read file srcfile caller syscall args strong weak; do
;;
esac
- cancellable=0
noerrno=0
errval=0
case $args in
- C*) cancellable=1; args=`echo $args | sed 's/C:\?//'`;;
E*) noerrno=1; args=`echo $args | sed 's/E:\?//'`;;
V*) errval=1; args=`echo $args | sed 's/V:\?//'`;;
esac
@@ -258,7 +255,6 @@ while read file srcfile caller syscall args strong weak; do
(echo '#define SYSCALL_NAME $syscall'; \\
echo '#define SYSCALL_NARGS $nargs'; \\
echo '#define SYSCALL_SYMBOL $strong'; \\
- echo '#define SYSCALL_CANCELLABLE $cancellable'; \\
echo '#define SYSCALL_NOERRNO $noerrno'; \\
echo '#define SYSCALL_ERRVAL $errval'; \\
echo '#include <syscall-template.S>'; \\"
diff --git a/sysdeps/unix/syscall-template.S b/sysdeps/unix/syscall-template.S
index 4993ff562d..00588a9cd1 100644
--- a/sysdeps/unix/syscall-template.S
+++ b/sysdeps/unix/syscall-template.S
@@ -17,9 +17,8 @@
<http://www.gnu.org/licenses/>. */
/* The real guts of this work are in the macros defined in the
- machine- and kernel-specific sysdep.h header file. When we
- are defining a cancellable system call, the sysdep-cancel.h
- versions of those macros are what we really use.
+ machine- and kernel-specific sysdep.h header file. Cancellable syscalls
+ should be implemented using C implementation with SYSCALL_CANCEL macro.
Each system call's object is built by a rule in sysd-syscalls
generated by make-syscalls.sh that #include's this file after
@@ -27,7 +26,6 @@
SYSCALL_NAME syscall name
SYSCALL_NARGS number of arguments this call takes
SYSCALL_SYMBOL primary symbol name
- SYSCALL_CANCELLABLE 1 if the call is a cancelation point
SYSCALL_NOERRNO 1 to define a no-errno version (see below)
SYSCALL_ERRVAL 1 to define an error-value version (see below)
@@ -41,11 +39,7 @@
instructions long and the untrained eye might not distinguish them from
some compiled code that inexplicably lacks source line information. */
-#if SYSCALL_CANCELLABLE
-# include <sysdep-cancel.h>
-#else
-# include <sysdep.h>
-#endif
+#include <sysdep.h>
/* This indirection is needed so that SYMBOL gets macro-expanded. */
#define syscall_hidden_def(SYMBOL) hidden_def (SYMBOL)
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
index 4be2259878..80732f5445 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h
@@ -18,108 +18,26 @@
#include <sysdep.h>
#include <tls.h>
-#ifndef __ASSEMBLER__
-# include <nptl/pthreadP.h>
-#endif
+#include <nptl/pthreadP.h>
#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
-# undef PSEUDO
-# define PSEUDO(name, syscall_name, args) \
- .section ".text"; \
-ENTRY (__##syscall_name##_nocancel); \
-.Lpseudo_nocancel: \
- DO_CALL (syscall_name, args); \
-.Lpseudo_finish: \
- cmn x0, 4095; \
- b.cs .Lsyscall_error; \
- .subsection 2; \
- .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
-ENTRY (name); \
- SINGLE_THREAD_P(16); \
- cbz w16, .Lpseudo_nocancel; \
- /* Setup common stack frame no matter the number of args. \
- Also save the first arg, since it's basically free. */ \
- stp x30, x0, [sp, -64]!; \
- cfi_adjust_cfa_offset (64); \
- cfi_rel_offset (x30, 0); \
- DOCARGS_##args; /* save syscall args around CENABLE. */ \
- CENABLE; \
- mov x16, x0; /* save mask around syscall. */ \
- UNDOCARGS_##args; /* restore syscall args. */ \
- DO_CALL (syscall_name, args); \
- str x0, [sp, 8]; /* save result around CDISABLE. */ \
- mov x0, x16; /* restore mask for CDISABLE. */ \
- CDISABLE; \
- /* Break down the stack frame, restoring result at once. */ \
- ldp x30, x0, [sp], 64; \
- cfi_adjust_cfa_offset (-64); \
- cfi_restore (x30); \
- b .Lpseudo_finish; \
- cfi_endproc; \
- .size name, .-name; \
- .previous
-
-# undef PSEUDO_END
-# define PSEUDO_END(name) \
- SYSCALL_ERROR_HANDLER; \
- cfi_endproc
-
-# define DOCARGS_0
-# define DOCARGS_1
-# define DOCARGS_2 str x1, [sp, 16]
-# define DOCARGS_3 stp x1, x2, [sp, 16]
-# define DOCARGS_4 DOCARGS_3; str x3, [sp, 32]
-# define DOCARGS_5 DOCARGS_3; stp x3, x4, [sp, 32]
-# define DOCARGS_6 DOCARGS_5; str x5, [sp, 48]
-
-# define UNDOCARGS_0
-# define UNDOCARGS_1 ldr x0, [sp, 8]
-# define UNDOCARGS_2 ldp x0, x1, [sp, 8]
-# define UNDOCARGS_3 UNDOCARGS_1; ldp x1, x2, [sp, 16]
-# define UNDOCARGS_4 UNDOCARGS_2; ldp x2, x3, [sp, 24]
-# define UNDOCARGS_5 UNDOCARGS_3; ldp x3, x4, [sp, 32]
-# define UNDOCARGS_6 UNDOCARGS_4; ldp x4, x5, [sp, 40]
-
# if IS_IN (libpthread)
-# define CENABLE bl __pthread_enable_asynccancel
-# define CDISABLE bl __pthread_disable_asynccancel
# define __local_multiple_threads __pthread_multiple_threads
# elif IS_IN (libc)
-# define CENABLE bl __libc_enable_asynccancel
-# define CDISABLE bl __libc_disable_asynccancel
# define __local_multiple_threads __libc_mu