mailing list of musl libc
 help / color / mirror / code / Atom feed
4f197f9a973c670005c9570e6cf850abccfc3552 blob 710 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
#include <time.h>
#include <limits.h>
#include "pthread_impl.h"

int timer_gettime(timer_t t, struct itimerspec *val)
{
	if ((intptr_t)t < 0) {
		pthread_t td = (void *)((uintptr_t)t << 1);
		t = (void *)(uintptr_t)(td->timer_id & INT_MAX);
	}
#ifdef SYS_timer_gettime64
	int r = __syscall(SYS_timer_gettime64, t, val);
	if (SYS_timer_gettime == SYS_timer_gettime64 || r!=-ENOSYS)
		return __syscall_ret(r);
	long val32[4];
	r = __syscall(SYS_timer_gettime, t, val32);
	if (!r) {
		val->it_interval.tv_sec = val32[0];
		val->it_interval.tv_nsec = val32[1];
		val->it_value.tv_sec = val32[2];
		val->it_value.tv_nsec = val32[3];
	}
	return __syscall_ret(r);
#endif
	return syscall(SYS_timer_gettime, t, val);
}
debug log:

solving 4f197f9a973c ...
found 4f197f9a973c in https://inbox.vuxu.org/musl/20201227184032.22413-6-alobakin@pm.me/
found 21c9d32c3fe5 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 21c9d32c3fe52e7502f10af91380ce4faead2c55	src/time/timer_gettime.c

applying [1/1] https://inbox.vuxu.org/musl/20201227184032.22413-6-alobakin@pm.me/
diff --git a/src/time/timer_gettime.c b/src/time/timer_gettime.c
index 21c9d32c3fe5..4f197f9a973c 100644

Checking patch src/time/timer_gettime.c...
Applied patch src/time/timer_gettime.c cleanly.

index at:
100644 4f197f9a973c670005c9570e6cf850abccfc3552	src/time/timer_gettime.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).