Barrier instructions in _atomic_lock() on ARMv7+

2013-07-30 Thread Richard Allen
Hi, I just wanted to let you know that _atomic_lock(), from _atomic_lock.c, as used by librthread should probably have a barrier instruction added to prevent the processor from reordering loads/stores around the atomic_lock. For more information about barriers on ARM, see: http://infocenter.arm.

Re: Barrier instructions in _atomic_lock() on ARMv7+

2013-07-31 Thread Richard Allen
Could we just use GCC intrinsics in C? On Jul 31, 2013 9:08 AM, "Artturi Alm" wrote: > On 07/31/13 16:37, Artturi Alm wrote: > >> On 07/31/13 08:57, Richard Allen wrote: >> >>> Hi, >>> >>> I just wanted to let you know that _atomic_lock()

Re: Barrier instructions in _atomic_lock() on ARMv7+

2013-08-01 Thread Richard Allen
earlier, i don't think it's supported, because of >> -march=armv6 and gcc version 4.2.1 20070719, unless i have missed >> something. >> >> On 08/01/13 02:28, Richard Allen wrote: >>> Could we just use GCC intrinsics in C? >>> On Jul 31, 2013 9:

Re: Barrier instructions in _atomic_lock() on ARMv7+

2013-08-03 Thread Richard Allen
I think we may also need an _atomic_unlock() to add a DMB during unlock as well. On Wed, Jul 31, 2013 at 8:37 AM, Artturi Alm wrote: > On 07/31/13 08:57, Richard Allen wrote: >> >> Hi, >> >> I just wanted to let you know that _atomic_lock(), from _atomic_lock.c, >