[Xenomai] Safe to use GCC atomics within Xenomai

Stefan S smarzlys at gmail.com
Thu Jun 26 14:17:09 CEST 2014


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
https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html)

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

Thank you :)




More information about the Xenomai mailing list