This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix x86 atomic_fetch_xor_release.
- From: Torvald Riegel <triegel at redhat dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 18 Oct 2016 13:02:43 +0200
- Subject: Re: [PATCH] Fix x86 atomic_fetch_xor_release.
- Authentication-results: sourceware.org; auth=none
- References: <1eeffe37-c4ec-fef7-537b-9ad17129b6c0@redhat.com>
On Mon, 2016-10-17 at 23:18 -0400, Carlos O'Donell wrote:
> Torvald,
>
> No code uses atomic_fetch_xor_release except for the upcoming conditional
> variable rewrite. Therefore there is no user visible bug here.
>
> The use of atomic_compare_and_exchange_bool_rel is removed (since it doesn't
> exist anymore), and is replaced by atomic_compare_exchange_weak_release.
>
> We use weak_release because it provides better performance in the loop
> (the weak semantic) and because the xor is release MO (the release semantic).
>
> We don't reload expected in the loop because atomic_compare_and_exchange_weak_release
> does this for us as part of the CAS failure.
>
> It is otherwise a fairly plain conversion that fixes building the new condvar
> for 32-bit x86.
>
> I have pushed the new condvar into Fedora Rawhide for testing.
>
> OK to checkin?
OK.