Move back to realtime clock
On some systems MONOTONIC still causes a hang.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/mutex.c b/mutex.c
index 34b3324..a447437 100644
--- a/mutex.c
+++ b/mutex.c
@@ -72,7 +72,6 @@
pthread_condattr_init(&cond);
pthread_condattr_setpshared(&cond, mflag);
- pthread_condattr_setclock(&cond, CLOCK_MONOTONIC);
pthread_cond_init(&mutex->cond, &cond);
ret = pthread_mutex_init(&mutex->lock, &attr);
@@ -95,7 +94,7 @@
struct timespec t;
int ret = 0;
- clock_gettime(CLOCK_MONOTONIC, &t);
+ clock_gettime(CLOCK_REALTIME, &t);
t.tv_sec += seconds;
pthread_mutex_lock(&mutex->lock);