This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/15640] The ARM port of lll_unlock uses atomic compare and swap to release a lock
- From: "adeb at nvidia dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 29 Jul 2013 21:08:05 +0000
- Subject: [Bug nptl/15640] The ARM port of lll_unlock uses atomic compare and swap to release a lock
- Auto-submitted: auto-generated
- References: <bug-15640-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15640
Abhishek Deb <adeb at nvidia dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |---
--- Comment #6 from Abhishek Deb <adeb at nvidia dot com> ---
Since the preprocessor macro atomic_exchange_rel was not explicity defined, it
gets defined to atomic_compare_and_exhange_*, which is defined using gcc's
atomic built-in __sync_val_compare_and_swap.
But I think atomic exchange is not the same as atomic compare and exchange. An
atomic exchange should be defined as ldex, stex, bne, whereas atomic compare
and exchange is defined as ldex, cmp, bne, stex, bne.
Doesn't look like gcc's atomic builtin in provides an explicit function to do
that http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/Atomic-Builtins.html.
However, gcc's atomic built in provides __sync_fetch_and_* . Can it be used to
build an atomic exchange.
--
You are receiving this mail because:
You are on the CC list for the bug.