mailing list of musl libc
 help / color / mirror / code / Atom feed
30dba40ec7b6466d7c0f376ae969c68786fa5baa blob 349 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 
#include <threads.h>
#include <pthread.h>
#include <errno.h>

int mtx_timedlock(mtx_t *restrict m, const struct timespec *restrict ts)
{
	int ret = pthread_mutex_clocklock((pthread_mutex_t *)m, CLOCK_REALTIME, ts);
	switch (ret) {
	default:        return thrd_error;
	case 0:         return thrd_success;
	case ETIMEDOUT: return thrd_timedout;
	}
}
debug log:

solving 30dba40e ...
found 30dba40e in https://inbox.vuxu.org/musl/20230620002507.796-5-luoyonggang@gmail.com/
found d22c8cf4 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 d22c8cf448163f148b016bfd72f81047124a6673	src/thread/mtx_timedlock.c

applying [1/1] https://inbox.vuxu.org/musl/20230620002507.796-5-luoyonggang@gmail.com/
diff --git a/src/thread/mtx_timedlock.c b/src/thread/mtx_timedlock.c
index d22c8cf4..30dba40e 100644

Checking patch src/thread/mtx_timedlock.c...
Applied patch src/thread/mtx_timedlock.c cleanly.

index at:
100644 30dba40ec7b6466d7c0f376ae969c68786fa5baa	src/thread/mtx_timedlock.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).