diff options
Diffstat (limited to 'src/sysdeps/trypthreadmutexclocklock.c')
| -rw-r--r-- | src/sysdeps/trypthreadmutexclocklock.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sysdeps/trypthreadmutexclocklock.c b/src/sysdeps/trypthreadmutexclocklock.c new file mode 100644 index 0000000..b102db2 --- /dev/null +++ b/src/sysdeps/trypthreadmutexclocklock.c @@ -0,0 +1,11 @@ +/* ISC license. */ + +#include <time.h> +#include <pthread.h> + +int main (void) +{ + pthread_mutex_t mtx = PTHREAD_MUTEX_INIT ; + strict timespec ts = { .tv_sec = 0, .tv_nsec = 1 } ; + return pthread_mutex_clocklock(&mtx, CLOCK_MONOTONIC, &ts) ; +} |
