This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/15640] The ARM port of lll_unlock uses atomic compare and swap to release a lock


http://sourceware.org/bugzilla/show_bug.cgi?id=15640

Dinar Temirbulatov <dtemirbulatov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Dinar Temirbulatov <dtemirbulatov at gmail dot com> ---
(In reply to Abhishek Deb from comment #2)
> On second thoughts, I think what is required is an atomic_exchange_rel and
> not atomic_compare_and_exchange. Though lll_unlock uses atomic_exchange_rel,
> but because atomic_exchange_rel was never defined for ARM, it gets defined
> to atomic_compare_and_exhange_rel. I think atomic_exchange_rel could perhaps
> be implemented with a pair of ldex, stex and a branch if the atomic exchange
> failed.

yes, This already have been done with that commit:

2010-11-24  Ken Werner  <ken.werner@de.ibm.com>

        * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (atomic_full_barrier,
        __arch_compare_and_exchange_val_32_acq): Use the atomic builtins
        provided by GCC if __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is defined.

and the feature is present in the glibc-2.14 arm ports. Also gcc-4.6 supports
all sync primitives for arm. Probably, you need to configure your toolchain
correctly (armv6 or armv7) in order to see the appropriate code.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]