]> 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)
committerStefan Hajnoczi <[email protected]>
Mon, 27 Feb 2017 14:00:53 +0000 (14:00 +0000)
commit1ab17f9f5c63c2798d707aeb22588e4fcc17b2cd
tree6ae3e0784c3a75bcea37c3d30bce2c2fb8a0b5f1
parentd045c466d9e62b4321fadf586d024d54ddfd8bd4
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: Stefan Hajnoczi <[email protected]>
tests/test-aio-multithread.c
This page took 0.026327 seconds and 4 git commands to generate.