X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=mutex.h;h=7be0ab1b44b7c96fa4d7be645a9ff95cc9e8a0bb;hp=40cfc1ede75430c542b0b1fc5b2d17cacfbff5e4;hb=4d4e80f2b4260f2c8b37a8612ce655502a799f7a;hpb=5f1348c709d91ffa54bde1a6a1beb53ecda613b7 diff --git a/mutex.h b/mutex.h index 40cfc1ed..7be0ab1b 100644 --- a/mutex.h +++ b/mutex.h @@ -7,6 +7,7 @@ struct fio_mutex { pthread_mutex_t lock; pthread_cond_t cond; int value; + int waiters; int mutex_fd; }; @@ -25,4 +26,9 @@ static inline struct fio_mutex *fio_mutex_rw_init(void) return fio_mutex_init(0); } +static inline int fio_mutex_getval(struct fio_mutex *mutex) +{ + return mutex->value; +} + #endif