On Fri, Sep 30, 2016 at 3:08 PM, Bas Nieuwenhuizen
<b...@basnieuwenhuizen.nl> wrote:
> On Fri, Sep 30, 2016 at 2:13 PM, Marek Olšák <mar...@gmail.com> wrote:
>> intptr_t reads and writes aren't atomic. p_atomic_set and
>> p_atomic_read functions don't do anything for atomicity. See:
>>
>> #define p_atomic_set(_v, _i) (*(_v) = (_i))
>> #define p_atomic_read(_v) (*(_v))
>
> That implementation seems bogus to me, as the compiler sees none of
> them as atomic and therefore the compiler can do strange stuff.
>
> why are intptr_t reads/writes less atomic than int32_t? IIRC on x86_64
> aligned 64-bit accesses are atomic, and on x86 intptr_t is just 32
> bits.

Really? Thanks, I didn't know that.

Marek
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to