]> Git Repo - qemu.git/commit
tests-aio-multithread: use atomic_read properly
authorPaolo Bonzini <[email protected]>
Mon, 27 Feb 2017 11:17:26 +0000 (12:17 +0100)
committerPeter Maydell <[email protected]>
Mon, 27 Feb 2017 12:54:08 +0000 (12:54 +0000)
commit3b1d8169844fafee184366b0e0d7080534758b4d
tree8f494ceb20aecaeea0d11077de547e102a9ba54f
parentd992f2f1368ceb92e6bfd8efece174110f4236ff
tests-aio-multithread: use atomic_read properly

nodes[id].next is written by other threads.  If atomic_read is not used
(matching atomic_set in mcs_mutex_lock!) the compiler can optimize the
whole "if" away!

Reported-by: Alex BennĂ©e <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Tested-by: Greg Kurz <[email protected]>
Message-id: 20170227111726[email protected]
Signed-off-by: Peter Maydell <[email protected]>
tests/test-aio-multithread.c
This page took 0.025079 seconds and 4 git commands to generate.