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: Dinar Temirbulatov <dinar at kugelworks dot com>
- To: Abhishek Deb <adeb at nvidia dot com>
- Cc: "libc-ports at sourceware dot org" <libc-ports at sourceware dot org>, "joseph at codesourcery dot com" <joseph at codesourcery dot com>
- Date: Mon, 19 Aug 2013 23:21:10 +0400
- Subject: Re: [Patch] ARM define atomic_exchange_acq/atomic_exchange_rel to __atomic_exchange_n
- References: <CANoaTN2hKTZ7GZCMsYqai25PHO7GLb56huLosR7+dgjAEK2FGQ at mail dot gmail dot com> <0E42B6C0C4628E48B8DF5D3F3C8FCA8898F1F8BF56 at HQMAIL02 dot nvidia dot com> <CANoaTN0MFzWmG8e7cuWkw067qp_p_UgsABtBXCcY+8CZRADzeg at mail dot gmail dot com> <0E42B6C0C4628E48B8DF5D3F3C8FCA8898F288A272 at HQMAIL02 dot nvidia dot com>
Abhishek,
>As I said currently __arch_compare_and_exchange_val_32_acq is defined to __sync_val_compare_and_swap ((mem), (oldval), (newval)), which probably uses two dmb.
>Can't __atomic_compare_exchange_n be used and appropriate memodel be specified for acquire and release variants?
Yes, Looks like that makes sense.
thanks, Dinar.