Fix wrong clock source in mutex
authorJens Axboe <jens.axboe@oracle.com>
Tue, 6 Oct 2009 06:50:01 +0000 (08:50 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 6 Oct 2009 06:50:01 +0000 (08:50 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
mutex.c

diff --git a/mutex.c b/mutex.c
index a44743745ab43d18b8342a67598b4977c1e43557..9f0f094dc11793feace1975ac880a636999030a7 100644 (file)
--- a/mutex.c
+++ b/mutex.c
@@ -94,7 +94,7 @@ int fio_mutex_down_timeout(struct fio_mutex *mutex, unsigned int seconds)
        struct timespec t;
        int ret = 0;
 
-       clock_gettime(CLOCK_REALTIME, &t);
+       clock_gettime(CLOCK_MONOTONIC, &t);
        t.tv_sec += seconds;
 
        pthread_mutex_lock(&mutex->lock);