projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af3e7a8
)
fio_sem: Remove a read_barrier() call
author
Bart Van Assche
<bvanassche@acm.org>
Sun, 21 Jun 2020 20:54:15 +0000
(13:54 -0700)
committer
Bart Van Assche
<bvanassche@acm.org>
Mon, 22 Jun 2020 02:19:27 +0000
(19:19 -0700)
Since pthread_mutex_lock() already provides load-acquire semantics, calling
read_barrier() just after pthread_mutex_lock() is not necessary. See also
commit
4d4e80f2b426
("Revamp file locking").
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
fio_sem.c
patch
|
blob
|
blame
|
history
diff --git
a/fio_sem.c
b/fio_sem.c
index c34d8bf76565ab7f93be9b9d2f6bbf41808f3950..c7806acb26ae3ea51211e5488819ce24add451db 100644
(file)
--- a/
fio_sem.c
+++ b/
fio_sem.c
@@
-169,7
+169,6
@@
void fio_sem_up(struct fio_sem *sem)
assert(sem->magic == FIO_SEM_MAGIC);
pthread_mutex_lock(&sem->lock);
- read_barrier();
if (!sem->value && sem->waiters)
do_wake = 1;
sem->value++;