aboutsummaryrefslogtreecommitdiff
path: root/src/signal/setitimer.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-03-20 00:16:43 -0400
committerRich Felker <dalias@aerifal.cx>2011-03-20 00:16:43 -0400
commitaa398f56fa398f2202b04e82c67f822f3233786f (patch)
tree7833c046c55b3d2b67c66433bacfa429a650d310 /src/signal/setitimer.c
parentbe82e122bf37fdcd1766d1ed220f0300b30ab6a3 (diff)
downloadmusl-aa398f56fa398f2202b04e82c67f822f3233786f.zip
musl-aa398f56fa398f2202b04e82c67f822f3233786f.tar.gz
musl-aa398f56fa398f2202b04e82c67f822f3233786f.tar.bz2
global cleanup to use the new syscall interface
Diffstat (limited to 'src/signal/setitimer.c')
-rw-r--r--src/signal/setitimer.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/signal/setitimer.c b/src/signal/setitimer.c
index cacab03..3b23758 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);
}