diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-03-20 00:16:43 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-03-20 00:16:43 -0400 |
commit | aa398f56fa398f2202b04e82c67f822f3233786f (patch) | |
tree | 7833c046c55b3d2b67c66433bacfa429a650d310 /src/ipc | |
parent | be82e122bf37fdcd1766d1ed220f0300b30ab6a3 (diff) | |
download | musl-aa398f56fa398f2202b04e82c67f822f3233786f.tar.gz musl-aa398f56fa398f2202b04e82c67f822f3233786f.tar.xz musl-aa398f56fa398f2202b04e82c67f822f3233786f.zip |
global cleanup to use the new syscall interface
Diffstat (limited to 'src/ipc')
-rw-r--r-- | src/ipc/semctl.c | 4 | ||||
-rw-r--r-- | src/ipc/semget.c | 4 | ||||
-rw-r--r-- | src/ipc/semop.c | 4 | ||||
-rw-r--r-- | src/ipc/shmat.c | 4 | ||||
-rw-r--r-- | src/ipc/shmctl.c | 4 | ||||
-rw-r--r-- | src/ipc/shmdt.c | 4 | ||||
-rw-r--r-- | src/ipc/shmget.c | 4 |
7 files changed, 14 insertions, 14 deletions
diff --git a/src/ipc/semctl.c b/src/ipc/semctl.c index 7ada116b..392a4aac 100644 --- a/src/ipc/semctl.c +++ b/src/ipc/semctl.c @@ -11,8 +11,8 @@ int semctl(int id, int num, int cmd, ...) arg = va_arg(ap, long); va_end(ap); #ifdef __NR_semctl - return syscall4(__NR_semctl, id, num, cmd, arg); + return syscall(SYS_semctl, id, num, cmd, arg); #else - return syscall5(__NR_ipc, IPCOP_semctl, id, num, cmd | 0x100, (long)&arg); + return syscall(SYS_ipc, IPCOP_semctl, id, num, cmd | 0x100, &arg); #endif } diff --git a/src/ipc/semget.c b/src/ipc/semget.c index 2dcf6eac..530c75ff 100644 --- a/src/ipc/semget.c +++ b/src/ipc/semget.c @@ -5,8 +5,8 @@ int semget(key_t key, int n, int fl) { #ifdef __NR_semget - return syscall3(__NR_semget, key, n, fl); + return syscall(SYS_semget, key, n, fl); #else - return syscall4(__NR_ipc, IPCOP_semget, key, n, fl); + return syscall(SYS_ipc, IPCOP_semget, key, n, fl); #endif } diff --git a/src/ipc/semop.c b/src/ipc/semop.c index 48d8a654..15453406 100644 --- a/src/ipc/semop.c +++ b/src/ipc/semop.c @@ -5,8 +5,8 @@ int semop(int id, struct sembuf *buf, size_t n) { #ifdef __NR_semop - return syscall3(__NR_semop, id, (long)buf, n); + return syscall(SYS_semop, id, buf, n); #else - return syscall5(__NR_ipc, IPCOP_semop, id, n, 0, (long)buf); + return syscall(SYS_ipc, IPCOP_semop, id, n, 0, buf); #endif } diff --git a/src/ipc/shmat.c b/src/ipc/shmat.c index 98a2cd42..c6ee4007 100644 --- a/src/ipc/shmat.c +++ b/src/ipc/shmat.c @@ -5,13 +5,13 @@ #ifdef __NR_shmat void *shmat(int id, const void *addr, int flag) { - return (void *)syscall3(__NR_shmat, id, (long)addr, flag); + return (void *)syscall(SYS_shmat, id, addr, flag); } #else void *shmat(int id, const void *addr, int flag) { unsigned long ret; - ret = syscall5(__NR_ipc, IPCOP_shmat, id, flag, (long)&addr, (long)addr); + ret = syscall(SYS_ipc, IPCOP_shmat, id, flag, &addr, addr); return (ret > -(unsigned long)SHMLBA) ? (void *)ret : (void *)addr; } #endif diff --git a/src/ipc/shmctl.c b/src/ipc/shmctl.c index da357fa8..3645fe2d 100644 --- a/src/ipc/shmctl.c +++ b/src/ipc/shmctl.c @@ -5,8 +5,8 @@ int shmctl(int id, int cmd, struct shmid_ds *buf) { #ifdef __NR_shmctl - return syscall3(__NR_shmctl, id, cmd, (long)buf); + return syscall(SYS_shmctl, id, cmd, buf); #else - return syscall4(__NR_ipc, IPCOP_shmctl, id, cmd | IPC_MODERN, (long)buf); + return syscall(SYS_ipc, IPCOP_shmctl, id, cmd | IPC_MODERN, buf); #endif } diff --git a/src/ipc/shmdt.c b/src/ipc/shmdt.c index e04188f9..b4c9e69f 100644 --- a/src/ipc/shmdt.c +++ b/src/ipc/shmdt.c @@ -5,8 +5,8 @@ int shmdt(const void *addr) { #ifdef __NR_shmdt - return syscall1(__NR_shmdt, (long)addr); + return syscall(SYS_shmdt, addr); #else - return syscall2(__NR_ipc, IPCOP_shmdt, (long)addr); + return syscall(SYS_ipc, IPCOP_shmdt, addr); #endif } diff --git a/src/ipc/shmget.c b/src/ipc/shmget.c index 86e254af..9b14f8d3 100644 --- a/src/ipc/shmget.c +++ b/src/ipc/shmget.c @@ -5,8 +5,8 @@ int shmget(key_t key, size_t size, int flag) { #ifdef __NR_shmget - return syscall3(__NR_shmget, key, size, flag); + return syscall(SYS_shmget, key, size, flag); #else - return syscall4(__NR_ipc, IPCOP_shmget, key, size, flag); + return syscall(SYS_ipc, IPCOP_shmget, key, size, flag); #endif } |