Fix problem with mutexes and MONOTONIC clock

With the latest fio git tree, I get:

    fio: job startup hung? exiting.

on startup, and it looks like the latest commit, 69a852f5 ("Fix wrong
clock source in mutex") breaks things for me (Ubuntu 9.10 beta).  My
system seems to use CLOCK_REALTIME for pthread_cond_timedwait() by
default.

The cleanest solution seems to be to explicitly set which clock to use
in pthread_cond_timedwait() via pthread_condattr_setclock() when
initializing the condition variable, although I'm not sure how portable
this is away from modern Linux (ie do all platforms that fio cares about
have pthread_condattr_setclock()?).

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1 file changed