-
Paolo Bonzini authored
mutex->from_push and mutex->handoff in qemu-coroutine-lock implement the familiar pattern: write a write b smp_mb() smp_mb() read b read a The memory barrier is required by the C memory model even after a SEQ_CST read-modify-write operation such as QSLIST_INSERT_HEAD_ATOMIC. Add it and avoid the unclear qatomic_mb_read() operation. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
Reviewed-by:
David Hildenbrand <david@redhat.com>
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>Paolo Bonzini authoredmutex->from_push and mutex->handoff in qemu-coroutine-lock implement the familiar pattern: write a write b smp_mb() smp_mb() read b read a The memory barrier is required by the C memory model even after a SEQ_CST read-modify-write operation such as QSLIST_INSERT_HEAD_ATOMIC. Add it and avoid the unclear qatomic_mb_read() operation. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
Reviewed-by:
David Hildenbrand <david@redhat.com>
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Loading