[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 05/18] atomics: add atomic_test_and_set_acqui
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v5 05/18] atomics: add atomic_test_and_set_acquire |
Date: |
Tue, 17 May 2016 19:08:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
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 also add atomic_clear_release() for completeness?
>> > The previous patch adds atomic_set_release.
> Yes, but it would take the advantage of __sync_lock_release() being just
> a release barrier rather than a full barrier of smp_mb() in
> atomic_set_release(). But that's only the case for legacy __sync
> built-ins (before GCC 4.7.0), though.
That will be fixed soon by adding smp_mb_acquire() and smp_mb_release(). :)
Paolo
[Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock, Emilio G. Cota, 2016/05/13
- Message not available
- Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock, Emilio G. Cota, 2016/05/17
- Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock, Sergey Fedorov, 2016/05/17
- Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock, Emilio G. Cota, 2016/05/17
- Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock, Sergey Fedorov, 2016/05/18
- Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock, Paolo Bonzini, 2016/05/18
- Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock, Sergey Fedorov, 2016/05/18
- Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock, Paolo Bonzini, 2016/05/18
Message not available