summaryrefslogblamecommitdiff
path: root/src/signal/getitimer.c
blob: 222d113e8602a82a6b2cd3f3001f60a16f54e2d3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                        
#include <sys/time.h>
#include "syscall.h"

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;
}