retire BIOS_SEG and umap_bios
[minix3.git] / lib / libc / sys-minix / setitimer.c
blobdfe86703f59d7e667d41d415dda22489d0310fde
1 #include <sys/cdefs.h>
2 #include "namespace.h"
3 #include <lib.h>
5 #include <sys/time.h>
7 /*
8 * This is the implementation of the function to
9 * invoke the interval timer setting system call.
11 int setitimer(int which, const struct itimerval *__restrict value,
12 struct itimerval *__restrict ovalue)
14 message m;
16 /* A null pointer for 'value' would make setitimer behave like getitimer,
17 * which is not according to the specification, so disallow null pointers.
19 if (value == NULL) return(EINVAL);
21 m.m1_i1 = which;
22 m.m1_p1 = (char *) __UNCONST(value);
23 m.m1_p2 = (char *) ovalue;
25 return _syscall(PM_PROC_NR, ITIMER, &m);