[PATCH v2] Fix atomic_full_barrier on x86 and x86_64.
H.J. Lu
hjl.tools@gmail.com
Tue Jun 23 16:07:00 GMT 2015
On Tue, Jun 23, 2015 at 6:34 AM, Torvald Riegel <triegel@redhat.com> wrote:
> This is a revision of
> https://sourceware.org/ml/libc-alpha/2014-10/msg00702.
>
> This fixes BZ #17403 by defining atomic_full_barrier,
> atomic_read_barrier, and atomic_write_barrier on x86 and x86_64. A full
> barrier is implemented through an atomic idempotent modification to the
> stack and not through using mfence because the latter can supposedly be
> somewhat slower due to having to provide stronger guarantees wrt
> self-modifying code, for example.
>
> Tested on x86_64-linux.
>
> H.J., is this OK for x86 and x32?
>
>
> 2015-06-23 Torvald Riegel <triegel@redhat.com>
>
> [BZ #17403]
> * sysdeps/x86_64/bits/atomic.h: (atomic_full_barrier,
> atomic_read_barrier, atomic_write_barrier): Define.
> * sysdeps/i386/i486/bits/atomic.h (atomic_full_barrier,
> atomic_read_barrier, atomic_write_barrier): Define.
>
>
It looks good to me.
Thanks.
--
H.J.
More information about the Libc-alpha
mailing list