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/process | |
parent | be82e122bf37fdcd1766d1ed220f0300b30ab6a3 (diff) | |
download | musl-aa398f56fa398f2202b04e82c67f822f3233786f.tar.gz musl-aa398f56fa398f2202b04e82c67f822f3233786f.tar.bz2 musl-aa398f56fa398f2202b04e82c67f822f3233786f.tar.xz musl-aa398f56fa398f2202b04e82c67f822f3233786f.zip |
global cleanup to use the new syscall interface
Diffstat (limited to 'src/process')
-rw-r--r-- | src/process/execve.c | 2 | ||||
-rw-r--r-- | src/process/fork.c | 6 | ||||
-rw-r--r-- | src/process/vfork.c | 2 | ||||
-rw-r--r-- | src/process/waitid.c | 2 | ||||
-rw-r--r-- | src/process/waitpid.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/process/execve.c b/src/process/execve.c index 2a0b62d6..70286a17 100644 --- a/src/process/execve.c +++ b/src/process/execve.c @@ -4,5 +4,5 @@ int execve(const char *path, char *const argv[], char *const envp[]) { /* do we need to use environ if envp is null? */ - return syscall3(__NR_execve, (long)path, (long)argv, (long)envp); + return syscall(SYS_execve, path, argv, envp); } diff --git a/src/process/fork.c b/src/process/fork.c index 87e7dc96..012b7ca5 100644 --- a/src/process/fork.c +++ b/src/process/fork.c @@ -7,11 +7,11 @@ pid_t fork(void) { pid_t ret; if (libc.fork_handler) libc.fork_handler(-1); - ret = syscall0(__NR_fork); + ret = syscall(SYS_fork); if (libc.lock && !ret) { pthread_t self = __pthread_self(); - self->pid = syscall0(__NR_getpid); - self->tid = syscall0(__NR_gettid); + self->pid = syscall(SYS_getpid); + self->tid = syscall(SYS_gettid); libc.threads_minus_1 = 0; } if (libc.fork_handler) libc.fork_handler(!ret); diff --git a/src/process/vfork.c b/src/process/vfork.c index 32a7a6ed..a7dd86c8 100644 --- a/src/process/vfork.c +++ b/src/process/vfork.c @@ -4,5 +4,5 @@ pid_t vfork(void) { /* vfork syscall cannot be made from C code */ - return syscall0(__NR_fork); + return syscall(SYS_fork); } diff --git a/src/process/waitid.c b/src/process/waitid.c index 0ec0d55c..b1e5e9b1 100644 --- a/src/process/waitid.c +++ b/src/process/waitid.c @@ -3,5 +3,5 @@ int waitid(idtype_t type, id_t id, siginfo_t *info, int options) { - return syscall5(__NR_waitid, type, id, (long)info, options, 0); + return syscall(SYS_waitid, type, id, info, options, 0); } diff --git a/src/process/waitpid.c b/src/process/waitpid.c index 0ddcd15a..ec2757b3 100644 --- a/src/process/waitpid.c +++ b/src/process/waitpid.c @@ -3,5 +3,5 @@ pid_t waitpid(pid_t pid, int *status, int options) { - return syscall4(__NR_wait4, pid, (long)status, options, 0); + return syscall(SYS_wait4, pid, status, options, 0); } |