[Xenomai] Safe to use GCC atomics within Xenomai
rpm at xenomai.org
Thu Jun 26 16:09:10 CEST 2014
On 06/26/2014 02:17 PM, Stefan S wrote:
> Hi all,
> GCC 4.6.3 (included in Ubuntu 12.04 LTS) supports atomic builtins.
> I would like to know whether it is safe to use the following builtins:
> * type __sync_fetch_and_or (type *ptr, type value, ...)
> * __sync_synchronize (...)
> * type __sync_lock_test_and_set (type *ptr, type value, ...)
> (Definitions taken from
> I know that in "asm/xenomai/atomic.h", there are some Xenomai specific
> defintions but not for the first one.
> My configuration:
> * Xenomai 2.6.3 with ipipe-core-3.10.32-x86-2 patch on a vanilla kernel
> * x86_64, Intel core i5
> * Ubuntu 12.04.4 LTS
I'm using gcc 4.8.2 (fedora) on x86 platforms currently, but I had no
issue with using the atomic builtins of the 4.6.x series some time ago
(Xenomai 3 depends on those builtins). So you should be ok.
More information about the Xenomai