]> git.ipfire.org Git - people/ms/strongswan.git/commit - src/libstrongswan/utils/utils.c
utils: Use GCC's __atomic built-ins if available
authorTobias Brunner <tobias@strongswan.org>
Fri, 11 Apr 2014 14:07:32 +0000 (16:07 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 24 Apr 2014 15:54:14 +0000 (17:54 +0200)
commit0f603d425df132adcb60b9f25ac277b26e80c72a
tree68b150acfcd3ad078e4311922dad2910e9ce137c
parentefedd0d21e4caf6edae6872f29c470a464e1917a
utils: Use GCC's __atomic built-ins if available

These are available since GCC 4.7 and will eventually replace the __sync
operations.  They support the memory model defined by C++11. For instance,
by using __ATOMIC_RELAXED for some operations on the reference counters we
can avoid memory barriers, which are required by __sync operations (whose
memory model essentially is __ATOMIC_SEQ_CST).
configure.ac
src/libstrongswan/utils/utils.c
src/libstrongswan/utils/utils.h