minix/lib/nbsd_libc/sys-minix/getitimer.c
Gianluca Guida 4f294c247f Add NBSDLibc Minix specific files.
This patch mainly copies and modifies files existing in
the current libc implementing minix specific functions.

To keep consisten with the NetBSD libc, we remove 
namespace stubs and we use "namespace.h" and weak
links.
2011-02-17 17:11:09 +00:00

21 lines
404 B
C

#include <sys/cdefs.h>
#include "namespace.h"
#include <lib.h>
#include <sys/time.h>
/*
* This is the implementation for the function to
* invoke the interval timer retrieval system call.
*/
int getitimer(int which, struct itimerval *value)
{
message m;
m.m1_i1 = which;
m.m1_p1 = NULL; /* only retrieve the timer */
m.m1_p2 = (char *) value;
return _syscall(PM_PROC_NR, ITIMER, &m);
}