etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libc / sys / getitimer.c
blobcb4ac563b2655a834fbee34037b3737c3c52cea0
1 #include <sys/cdefs.h>
2 #include "namespace.h"
3 #include <lib.h>
5 #include <string.h>
6 #include <sys/time.h>
8 /*
9 * This is the implementation for the function to
10 * invoke the interval timer retrieval system call.
12 int getitimer(int which, struct itimerval *value)
14 message m;
16 memset(&m, 0, sizeof(m));
17 m.m_lc_pm_itimer.which = which;
18 m.m_lc_pm_itimer.value = 0; /* only retrieve the timer */
19 m.m_lc_pm_itimer.ovalue = (vir_bytes)value;
21 return _syscall(PM_PROC_NR, PM_ITIMER, &m);
24 #if defined(__minix) && defined(__weak_alias)
25 __weak_alias(getitimer, __getitimer50)
26 #endif