about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/alpha
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2016-10-26 18:04:48 -0200
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2016-12-28 20:31:05 -0200
commit8232e7d2097eb8e5ca5548ff1ae3f7257f274a87 (patch)
tree22600c77563c75b0a6485fe61bac68bcdcb9d635 /sysdeps/unix/sysv/linux/alpha
parent1afc369f1aa153ffcfbc50b4e840bdf5746b705d (diff)
downloadglibc-8232e7d2097eb8e5ca5548ff1ae3f7257f274a87.tar.gz
glibc-8232e7d2097eb8e5ca5548ff1ae3f7257f274a87.tar.xz
glibc-8232e7d2097eb8e5ca5548ff1ae3f7257f274a87.zip
Use shmat syscall for Linux implementation
This patch add a direct call to shmat syscall if it is supported by
kernel features.

Checked on x86_64, i686, powerpc64le, aarch64, and armhf.

	* sysdeps/unix/sysv/linux/alpha/syscalls.list (shmat): Remove.
	* sysdeps/unix/sysv/linux/arm/syscalls.list (shmat): Likewise.
	* sysdeps/unix/sysv/linux/generic/syscalls.list (shmat): Likewise.
	* sysdeps/unix/sysv/linux/hppa/syscalls.list (shmat): Likewise.
	* sysdeps/unix/sysv/linux/ia64/syscalls.list (shmat): Likewise.
	* sysdeps/unix/sysv/linux/microblaze/syscalls.list (shmat): Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (shmat):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (shmat):
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/syscalls.list (shmat): Likewise.
	* sysdeps/unix/sysv/linux/alpha/kernel-features.h (__NR_shmat):
	Define to __NR_osf_shmat.
	* sysdeps/unix/sysv/linux/shmat.c (shmat): Use shmat syscall if it is
	defined.
Diffstat (limited to 'sysdeps/unix/sysv/linux/alpha')
-rw-r--r--sysdeps/unix/sysv/linux/alpha/kernel-features.h3
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscalls.list1
2 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h
index f09222d225..2fc3b7758a 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h
@@ -29,4 +29,7 @@
 #undef __ASSUME_STATFS64
 #define __ASSUME_STATFS64 0
 
+/* Alpha defines SysV ipc shmat syscall with a different name.  */
+#define __NR_shmat __NR_osf_shmat
+
 #endif /* _KERNEL_FEATURES_H */
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 8d3a042afe..9948d2d176 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -1,6 +1,5 @@
 # File name	Caller	Syscall name	# args	Strong name	Weak names
 
-shmat		-	osf_shmat	i:ipi	__shmat		shmat
 oldshmctl	EXTRA	shmctl		i:iip	__old_shmctl	shmctl@GLIBC_2.0
 shmdt		-	shmdt		i:s	__shmdt		shmdt
 shmget		-	shmget		i:iii	__shmget	shmget