mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-06 12:00:24 +08:00
Use shmdt syscall for linux implementation
this patch add a direct call to shmdt syscall if it is supported by kernel features. hecked on x86_64, i686, powerpc64le, aarch64, and armhf. * sysdeps/unix/sysv/linux/alpha/syscalls.list (shmdt): Remove. * sysdeps/unix/sysv/linux/arm/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/generic/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/hppa/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/microblaze/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list (shmdt): Likewise. * sysdeps/unix/sysv/linux/shmdt.c (shmdt): Use shmdt syscall if it is defined.
This commit is contained in:
parent
e01f79e412
commit
214f017fdf
14
ChangeLog
14
ChangeLog
@ -1,5 +1,19 @@
|
|||||||
2016-12-28 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
2016-12-28 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/syscalls.list (shmdt): Remove.
|
||||||
|
* sysdeps/unix/sysv/linux/arm/syscalls.list (shmdt): Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/generic/syscalls.list (shmdt): Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/hppa/syscalls.list (shmdt): Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/ia64/syscalls.list (shmdt): Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/microblaze/syscalls.list (shmdt): Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (shmdt):
|
||||||
|
Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (shmdt):
|
||||||
|
Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/syscalls.list (shmdt): Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/shmdt.c (shmdt): Use shmdt syscall if it is
|
||||||
|
defined.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/alpha/Makefile (sysdeps_routines): Remove
|
* sysdeps/unix/sysv/linux/alpha/Makefile (sysdeps_routines): Remove
|
||||||
oldshmctl.
|
oldshmctl.
|
||||||
* sysdeps/unix/sysv/linux/alpha/syscalls.list (shmctl): Remove.
|
* sysdeps/unix/sysv/linux/alpha/syscalls.list (shmctl): Remove.
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# File name Caller Syscall name # args Strong name Weak names
|
# File name Caller Syscall name # args Strong name Weak names
|
||||||
|
|
||||||
shmdt - shmdt i:s __shmdt shmdt
|
|
||||||
shmget - shmget i:iii __shmget shmget
|
shmget - shmget i:iii __shmget shmget
|
||||||
|
|
||||||
sigstack - sigstack 2 sigstack
|
sigstack - sigstack 2 sigstack
|
||||||
|
@ -23,7 +23,6 @@ personality EXTRA personality Ei:i __personality personality
|
|||||||
|
|
||||||
# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
|
# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
|
||||||
# wrappers (to set __IPC_64).
|
# wrappers (to set __IPC_64).
|
||||||
shmdt - shmdt i:s __shmdt shmdt
|
|
||||||
shmget - shmget i:iii __shmget shmget
|
shmget - shmget i:iii __shmget shmget
|
||||||
|
|
||||||
# proper socket implementations:
|
# proper socket implementations:
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
# SysV APIs
|
# SysV APIs
|
||||||
shmget - shmget i:iii __shmget shmget
|
shmget - shmget i:iii __shmget shmget
|
||||||
shmdt - shmdt i:s __shmdt shmdt
|
|
||||||
|
|
||||||
# Socket APIs
|
# Socket APIs
|
||||||
socket - socket i:iii __socket socket
|
socket - socket i:iii __socket socket
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# File name Caller Syscall name # args Strong name Weak names
|
# File name Caller Syscall name # args Strong name Weak names
|
||||||
|
|
||||||
# semaphore and shm system calls
|
# semaphore and shm system calls
|
||||||
shmdt - shmdt i:s __shmdt shmdt
|
|
||||||
shmget - shmget i:iii __shmget shmget
|
shmget - shmget i:iii __shmget shmget
|
||||||
|
|
||||||
# proper socket implementations:
|
# proper socket implementations:
|
||||||
|
@ -5,7 +5,6 @@ umount2 - umount 2 __umount2 umount2
|
|||||||
getpriority - getpriority i:ii __getpriority getpriority
|
getpriority - getpriority i:ii __getpriority getpriority
|
||||||
|
|
||||||
# semaphore and shm system calls
|
# semaphore and shm system calls
|
||||||
shmdt - shmdt i:s __shmdt shmdt
|
|
||||||
shmget - shmget i:iii __shmget shmget
|
shmget - shmget i:iii __shmget shmget
|
||||||
|
|
||||||
# proper socket implementations:
|
# proper socket implementations:
|
||||||
|
@ -8,5 +8,4 @@ personality EXTRA personality Ei:i __personality personality
|
|||||||
|
|
||||||
# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
|
# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
|
||||||
# wrappers (to set __IPC_64).
|
# wrappers (to set __IPC_64).
|
||||||
shmdt - shmdt i:s __shmdt shmdt
|
|
||||||
shmget - shmget i:iii __shmget shmget
|
shmget - shmget i:iii __shmget shmget
|
||||||
|
@ -2,5 +2,4 @@
|
|||||||
|
|
||||||
# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
|
# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
|
||||||
# wrappers (to set __IPC_64).
|
# wrappers (to set __IPC_64).
|
||||||
shmdt - shmdt i:s __shmdt shmdt
|
|
||||||
shmget - shmget i:iii __shmget shmget
|
shmget - shmget i:iii __shmget shmget
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# File name Caller Syscall name # args Strong name Weak names
|
# File name Caller Syscall name # args Strong name Weak names
|
||||||
|
|
||||||
# semaphore and shm system calls
|
# semaphore and shm system calls
|
||||||
shmdt - shmdt i:s __shmdt shmdt
|
|
||||||
shmget - shmget i:iii __shmget shmget
|
shmget - shmget i:iii __shmget shmget
|
||||||
|
@ -16,12 +16,10 @@
|
|||||||
License along with the GNU C Library; if not, see
|
License along with the GNU C Library; if not, see
|
||||||
<http://www.gnu.org/licenses/>. */
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <errno.h>
|
#include <sys/msg.h>
|
||||||
#include <sys/shm.h>
|
|
||||||
#include <ipc_priv.h>
|
#include <ipc_priv.h>
|
||||||
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
#include <sys/syscall.h>
|
#include <errno.h>
|
||||||
|
|
||||||
/* Detach shared memory segment starting at address specified by SHMADDR
|
/* Detach shared memory segment starting at address specified by SHMADDR
|
||||||
from the caller's data segment. */
|
from the caller's data segment. */
|
||||||
@ -29,5 +27,9 @@
|
|||||||
int
|
int
|
||||||
shmdt (const void *shmaddr)
|
shmdt (const void *shmaddr)
|
||||||
{
|
{
|
||||||
return INLINE_SYSCALL (ipc, 5, IPCOP_shmdt, 0, 0, 0, (void *) shmaddr);
|
#ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
|
||||||
|
return INLINE_SYSCALL_CALL (shmdt, shmaddr);
|
||||||
|
#else
|
||||||
|
return INLINE_SYSCALL_CALL (ipc, IPCOP_shmdt, 0, 0, 0, shmaddr);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ pread64 - pread64 Ci:ipii __libc_pread __libc_pread64 __pread64 pread64 __prea
|
|||||||
preadv64 - preadv Ci:ipii preadv64 preadv
|
preadv64 - preadv Ci:ipii preadv64 preadv
|
||||||
pwrite64 - pwrite64 Ci:ipii __libc_pwrite __libc_pwrite64 __pwrite64 pwrite64 __pwrite pwrite
|
pwrite64 - pwrite64 Ci:ipii __libc_pwrite __libc_pwrite64 __pwrite64 pwrite64 __pwrite pwrite
|
||||||
pwritev64 - pwritev Ci:ipii pwritev64 pwritev
|
pwritev64 - pwritev Ci:ipii pwritev64 pwritev
|
||||||
shmdt - shmdt i:s __shmdt shmdt
|
|
||||||
shmget - shmget i:iii __shmget shmget
|
shmget - shmget i:iii __shmget shmget
|
||||||
syscall_clock_gettime EXTRA clock_gettime Ei:ip __syscall_clock_gettime
|
syscall_clock_gettime EXTRA clock_gettime Ei:ip __syscall_clock_gettime
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user