Re: [Qemu-devel] [PATCH v5 05/18] atomics: add atomic_test_and_set_acquire

2016-05-17 Thread Paolo Bonzini
On 17/05/2016 18:47, Sergey Fedorov wrote: >>> >> On 14/05/16 06:34, Emilio G. Cota wrote: >>> This new helper expands to __atomic_test_and_set with acquire semantics >>> where available; otherwise it expands to __sync_test_and_set, which >>> has acquire semantics. >>> >> Why don't

Re: [Qemu-devel] [PATCH v5 05/18] atomics: add atomic_test_and_set_acquire

2016-05-17 Thread Sergey Fedorov
On 17/05/16 19:23, Paolo Bonzini wrote: > > On 17/05/2016 18:15, Sergey Fedorov wrote: >> On 14/05/16 06:34, Emilio G. Cota wrote: >>> This new helper expands to __atomic_test_and_set with acquire semantics >>> where available; otherwise it expands to __sync_test_and_set, which >>> has acquire sema

Re: [Qemu-devel] [PATCH v5 05/18] atomics: add atomic_test_and_set_acquire

2016-05-17 Thread Paolo Bonzini
On 17/05/2016 18:15, Sergey Fedorov wrote: > On 14/05/16 06:34, Emilio G. Cota wrote: >> This new helper expands to __atomic_test_and_set with acquire semantics >> where available; otherwise it expands to __sync_test_and_set, which >> has acquire semantics. > > Why don't also add atomic_clear_re

Re: [Qemu-devel] [PATCH v5 05/18] atomics: add atomic_test_and_set_acquire

2016-05-17 Thread Sergey Fedorov
On 14/05/16 06:34, Emilio G. Cota wrote: > This new helper expands to __atomic_test_and_set with acquire semantics > where available; otherwise it expands to __sync_test_and_set, which > has acquire semantics. Why don't also add atomic_clear_release() for completeness? Kind regards, Sergey > > S

Re: [Qemu-devel] [PATCH v5 05/18] atomics: add atomic_test_and_set_acquire

2016-05-16 Thread Paolo Bonzini
On 14/05/2016 05:34, Emilio G. Cota wrote: > This new helper expands to __atomic_test_and_set with acquire semantics > where available; otherwise it expands to __sync_test_and_set, which > has acquire semantics. > > Signed-off-by: Emilio G. Cota Non-seqcst read-modify-write operations are beyo

[Qemu-devel] [PATCH v5 05/18] atomics: add atomic_test_and_set_acquire

2016-05-13 Thread Emilio G. Cota
This new helper expands to __atomic_test_and_set with acquire semantics where available; otherwise it expands to __sync_test_and_set, which has acquire semantics. Signed-off-by: Emilio G. Cota --- include/qemu/atomic.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/qemu/atomic.h