summaryrefslogtreecommitdiff
path: root/filesetup.c
diff options
context:
space:
mode:
Diffstat (limited to 'filesetup.c')
-rw-r--r--filesetup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/filesetup.c b/filesetup.c
index 4b0f40d6..7cbce132 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -1622,7 +1622,7 @@ int add_file(struct thread_data *td, const char *fname, int numjob, int inc)
f->rwlock = fio_rwlock_init();
break;
case FILE_LOCK_EXCLUSIVE:
- f->lock = fio_mutex_init(FIO_MUTEX_UNLOCKED);
+ f->lock = fio_sem_init(FIO_SEM_UNLOCKED);
break;
default:
log_err("fio: unknown lock mode: %d\n", td->o.file_lock_mode);
@@ -1707,7 +1707,7 @@ void lock_file(struct thread_data *td, struct fio_file *f, enum fio_ddir ddir)
else
fio_rwlock_write(f->rwlock);
} else if (td->o.file_lock_mode == FILE_LOCK_EXCLUSIVE)
- fio_mutex_down(f->lock);
+ fio_sem_down(f->lock);
td->file_locks[f->fileno] = td->o.file_lock_mode;
}
@@ -1720,7 +1720,7 @@ void unlock_file(struct thread_data *td, struct fio_file *f)
if (td->o.file_lock_mode == FILE_LOCK_READWRITE)
fio_rwlock_unlock(f->rwlock);
else if (td->o.file_lock_mode == FILE_LOCK_EXCLUSIVE)
- fio_mutex_up(f->lock);
+ fio_sem_up(f->lock);
td->file_locks[f->fileno] = FILE_LOCK_NONE;
}