OSDN Git Service
(root)
/
android-x86
/
external-musl-libc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
remove unused __futex function and source file
[android-x86/external-musl-libc.git]
/
src
/
thread
/
mtx_timedlock.c
1
#include <threads.h>
2
#include <pthread.h>
3
#include <errno.h>
4
5
int mtx_timedlock(mtx_t *restrict m, const struct timespec *restrict ts)
6
{
7
int ret = __pthread_mutex_timedlock((pthread_mutex_t *)m, ts);
8
switch (ret) {
9
default: return thrd_error;
10
case 0: return thrd_success;
11
case ETIMEDOUT: return thrd_timedout;
12
}
13
}