[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set s
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock |
Date: |
Tue, 17 May 2016 12:19:27 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
On 05/17/2016 10:13 AM, Sergey Fedorov wrote:
>> > +static inline void qemu_spin_lock(QemuSpin *spin)
>> > +{
>> > + while (atomic_test_and_set_acquire(&spin->value)) {
>>From gcc-4.8 info page, node "__atomic Builtins", description of
> __atomic_test_and_set():
>
> It should be only used for operands of type 'bool' or 'char'.
>
Hum. I thought I remembered all operand sizes there, but I've just re-checked
and you're right about bool (and really only bool).
Perhaps we should just stick with __sync_test_and_set then. I'm thinking here
of e.g. armv6, a reasonable host, which can't operate on 1 byte atomic values.
r~
- Re: [Qemu-devel] [PATCH v5 05/18] atomics: add atomic_test_and_set_acquire, (continued)
[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
- Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock,
Richard Henderson <=
- 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, 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
- Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock, Emilio G. Cota, 2016/05/18
- Re: [Qemu-devel] [PATCH v5 07/18] qemu-thread: add simple test-and-set spinlock, Paolo Bonzini, 2016/05/18