This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [Patch] ARM define atomic_exchange_acq/atomic_exchange_rel to __atomic_exchange_n
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Dinar Temirbulatov <dinar at kugelworks dot com>
- Cc: <libc-ports at sourceware dot org>, <adeb at nvidia dot com>
- Date: Sun, 18 Aug 2013 20:29:32 +0000
- Subject: Re: [Patch] ARM define atomic_exchange_acq/atomic_exchange_rel to __atomic_exchange_n
- References: <CANoaTN2hKTZ7GZCMsYqai25PHO7GLb56huLosR7+dgjAEK2FGQ at mail dot gmail dot com>
On Tue, 13 Aug 2013, Dinar Temirbulatov wrote:
> Hello,
> Following patch redefines atomic_exchange_acq/atomic_exchange_rel to
> __atomic_exchange_n for ARM, that allows for example to reduce number
> of instruction sequence for lll_unlock
> from:
> ldex, cmp, bne, stex, cmp, bne
> to
> ldex, stex, cmp, bne
> , more on the issue here:
> http://sourceware.org/bugzilla/show_bug.cgi?id=15640
>
> This patch was tested on ARM a9 with glibc testsuite with no new
> regressions. OK to commit?
What does this do when building for an ARM architecture version where the
kernel helpers need to be used for atomicity?
I think what's desired in such a case is for the operations to continue to
be expanded with inline calls to the kernel helpers. Generating
out-of-line calls to libgcc helpers would be less desirable (and
out-of-line calls to anything not in libgcc.a would break the build).
--
Joseph S. Myers
joseph@codesourcery.com