mailing list of musl libc
 help / color / mirror / code / Atom feed
d8eaafd57064f7a4db27c28f178d3907c9efbc3c blob 666 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 <errno.h>
#include "syscall.h"
#include "libc.h"
#include "threads.h"

/* Roughly __syscall already returns the right thing: 0 if all went
 * well or a negative error indication, otherwise. */
int thrd_sleep(const struct timespec *req, struct timespec *rem)
{
	int ret = __syscall(SYS_nanosleep, req, rem);
	switch (ret) {
	case 0:
		return 0;
		/* error described by POSIX:
		 * EINTR  The nanosleep() function was interrupted by a signal.
		 * The C11 wording is:
		 * -1 if it has been interrupted by a signal */
	case -EINTR:
		return -1;
		/* EINVAL: described by POSIX
		 * EFAULT: described for linux */
	default:
		return -2;
	}
}
debug log:

solving d8eaafd ...
found d8eaafd in https://inbox.vuxu.org/musl/84b57c4f92b17384a2acdb2909d7ad8290abe31f.1409524413.git.Jens.Gustedt@inria.fr/
found 3dbfe47 in https://inbox.vuxu.org/musl/e055ebf55ff719cd25cb1446a642c8c032475223.1409524413.git.Jens.Gustedt@inria.fr/ ||
	https://inbox.vuxu.org/musl/aaebc5b34089d367a4fa1a9e8f35712bcaf3c8e5.1409423162.git.Jens.Gustedt@inria.fr/

applying [1/3] https://inbox.vuxu.org/musl/e055ebf55ff719cd25cb1446a642c8c032475223.1409524413.git.Jens.Gustedt@inria.fr/
diff --git a/src/time/thrd_sleep.c b/src/time/thrd_sleep.c
new file mode 100644
index 0000000..3dbfe47

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

skipping https://inbox.vuxu.org/musl/aaebc5b34089d367a4fa1a9e8f35712bcaf3c8e5.1409423162.git.Jens.Gustedt@inria.fr/ for 3dbfe47
index at:
100644 3dbfe47fd68c4f9c6cae07476b227e61c566eefe	src/time/thrd_sleep.c

applying [2/3] https://inbox.vuxu.org/musl/84b57c4f92b17384a2acdb2909d7ad8290abe31f.1409524413.git.Jens.Gustedt@inria.fr/
diff --git a/src/time/thrd_sleep.c b/src/time/thrd_sleep.c
index 3dbfe47..d8eaafd 100644

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

index at:
100644 d8eaafd57064f7a4db27c28f178d3907c9efbc3c	src/time/thrd_sleep.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).