aboutsummaryrefslogtreecommitdiff
path: root/src/time/timer_getoverrun.c
blob: 12253b18c34def3cc2755838eccff183a859584f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <time.h>
#include <limits.h>
#include "pthread_impl.h"

int timer_getoverrun(timer_t t)
{
	if ((intptr_t)t < 0) {
		pthread_t td = (void *)((uintptr_t)t << 1);
		t = (void *)(uintptr_t)(td->timer_id & INT_MAX);
	}
	return syscall(SYS_timer_getoverrun, t);
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif