about summary refs log tree commit diff
path: root/src/signal
diff options
context:
space:
mode:
Diffstat (limited to 'src/signal')
-rw-r--r--src/signal/getitimer.c7
-rw-r--r--src/signal/kill.c2
-rw-r--r--src/signal/raise.c6
-rw-r--r--src/signal/setitimer.c10
-rw-r--r--src/signal/sigaction.c2
-rw-r--r--src/signal/sigaltstack.c2
-rw-r--r--src/signal/sigprocmask.c2
-rw-r--r--src/signal/sigqueue.c2
8 files changed, 10 insertions, 23 deletions
diff --git a/src/signal/getitimer.c b/src/signal/getitimer.c
index 222d113e..8a8046a7 100644
--- a/src/signal/getitimer.c
+++ b/src/signal/getitimer.c
@@ -3,10 +3,5 @@
 
 int getitimer(int which, struct itimerval *old)
 {
-	int ret;
-	long kold[4];
-
-	if (!(ret = syscall2(__NR_getitimer, which, (long)&kold)))
-		*old = (struct itimerval){ { kold[0], kold[1] }, { kold[2], kold[3] } };
-	return ret;
+	return syscall(SYS_getitimer, which, old);
 }
diff --git a/src/signal/kill.c b/src/signal/kill.c
index cc4b51e1..05805733 100644
--- a/src/signal/kill.c
+++ b/src/signal/kill.c
@@ -3,5 +3,5 @@
 
 int kill(pid_t pid, int sig)
 {
-	return syscall2(__NR_kill, pid, sig);
+	return syscall(SYS_kill, pid, sig);
 }
diff --git a/src/signal/raise.c b/src/signal/raise.c
index cc2b19b7..9948f418 100644
--- a/src/signal/raise.c
+++ b/src/signal/raise.c
@@ -10,9 +10,9 @@ int raise(int sig)
 	sigset_t set;
 	sigfillset(&set);
 	__sigprocmask(SIG_BLOCK, &set, &set);
-	tid = syscall0(__NR_gettid);
-	pid = syscall0(__NR_getpid);
-	ret = syscall3(__NR_tgkill, pid, tid, sig);
+	tid = syscall(SYS_gettid);
+	pid = syscall(SYS_getpid);
+	ret = syscall(SYS_tgkill, pid, tid, sig);
 	__sigprocmask(SIG_SETMASK, &set, 0);
 	return ret;
 }
diff --git a/src/signal/setitimer.c b/src/signal/setitimer.c
index cacab036..3b237580 100644
--- a/src/signal/setitimer.c
+++ b/src/signal/setitimer.c
@@ -3,13 +3,5 @@
 
 int setitimer(int which, const struct itimerval *new, struct itimerval *old)
 {
-	int ret;
-	long knew[4] = {
-		new->it_interval.tv_sec, new->it_interval.tv_usec,
-		new->it_value.tv_sec, new->it_value.tv_usec
-	}, kold[4];
-
-	if (!(ret = syscall3(__NR_setitimer, which, (long)&knew, old ? (long)&kold : 0)) && old)
-		*old = (struct itimerval){ { kold[0], kold[1] }, { kold[2], kold[3] } };
-	return ret;
+	return syscall(SYS_setitimer, which, new, old);
 }
diff --git a/src/signal/sigaction.c b/src/signal/sigaction.c
index b1603b9f..3d374e1f 100644
--- a/src/signal/sigaction.c
+++ b/src/signal/sigaction.c
@@ -23,7 +23,7 @@ int __libc_sigaction(int sig, const struct sigaction *sa, struct sigaction *old)
 		pksa = (long)&ksa;
 	}
 	if (old) pkold = (long)&kold;
-	if (syscall4(__NR_rt_sigaction, sig, pksa, pkold, 8))
+	if (syscall(SYS_rt_sigaction, sig, pksa, pkold, 8))
 		return -1;
 	if (old) {
 		old->sa_handler = kold.handler;
diff --git a/src/signal/sigaltstack.c b/src/signal/sigaltstack.c
index 6e46d098..550f2f9d 100644
--- a/src/signal/sigaltstack.c
+++ b/src/signal/sigaltstack.c
@@ -14,5 +14,5 @@ int sigaltstack(const stack_t *ss, stack_t *old)
 			return -1;
 		}
 	}
-	return syscall2(__NR_sigaltstack, (long)ss, (long)old);
+	return syscall(SYS_sigaltstack, ss, old);
 }
diff --git a/src/signal/sigprocmask.c b/src/signal/sigprocmask.c
index 96d08478..66b17a42 100644
--- a/src/signal/sigprocmask.c
+++ b/src/signal/sigprocmask.c
@@ -6,7 +6,7 @@
 
 int __libc_sigprocmask(int how, const sigset_t *set, sigset_t *old)
 {
-	return syscall4(__NR_rt_sigprocmask, how, (long)set, (long)old, 8);
+	return syscall(SYS_rt_sigprocmask, how, set, old, 8);
 }
 
 int __sigprocmask(int how, const sigset_t *set, sigset_t *old)
diff --git a/src/signal/sigqueue.c b/src/signal/sigqueue.c
index b8135d56..aeac4875 100644
--- a/src/signal/sigqueue.c
+++ b/src/signal/sigqueue.c
@@ -12,5 +12,5 @@ int sigqueue(pid_t pid, int sig, const union sigval value)
 	si.si_value = value;
 	si.si_pid = getpid();
 	si.si_uid = getuid();
-	return syscall3(__NR_rt_sigqueueinfo, pid, sig, (long)&si);
+	return syscall(SYS_rt_sigqueueinfo, pid, sig, &si);
 }