about summary refs log tree commit diff
path: root/src/process
diff options
context:
space:
mode:
Diffstat (limited to 'src/process')
-rw-r--r--src/process/execve.c2
-rw-r--r--src/process/fork.c6
-rw-r--r--src/process/vfork.c2
-rw-r--r--src/process/waitid.c2
-rw-r--r--src/process/waitpid.c2
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);
 }