X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=diskutil.h;h=15ec681a449c4a9b34929933ab95f1c85b3c1257;hp=ee5c0afd75984535da56fae52b9788f8c3e591f2;hb=fd98fb689d5ad7e9977461e961fff3fdd37f9cb8;hpb=ae626d4ead6416adf464cf209cdf3e8b85d58190 diff --git a/diskutil.h b/diskutil.h index ee5c0afd..15ec681a 100644 --- a/diskutil.h +++ b/diskutil.h @@ -3,9 +3,8 @@ #include "json.h" #define FIO_DU_NAME_SZ 64 -#include "lib/output_buffer.h" #include "helper_thread.h" -#include "mutex.h" +#include "fio_sem.h" struct disk_util_stats { uint64_t ios[2]; @@ -67,7 +66,7 @@ struct disk_util { struct timespec time; - struct fio_mutex *lock; + struct fio_sem *lock; unsigned long users; }; @@ -76,7 +75,7 @@ static inline void disk_util_mod(struct disk_util *du, int val) if (du) { struct flist_head *n; - fio_mutex_down(du->lock); + fio_sem_down(du->lock); du->users += val; flist_for_each(n, &du->slavelist) { @@ -85,7 +84,7 @@ static inline void disk_util_mod(struct disk_util *du, int val) slave = flist_entry(n, struct disk_util, slavelist); slave->users += val; } - fio_mutex_up(du->lock); + fio_sem_up(du->lock); } } static inline void disk_util_inc(struct disk_util *du)