14 #ifndef LEGATO_ATOMIC_INCLUDE_GUARD 15 #define LEGATO_ATOMIC_INCLUDE_GUARD 22 #define LE_ATOMIC_ORDER_RELAXED __ATOMIC_RELAXED 28 #define LE_ATOMIC_ORDER_ACQUIRE __ATOMIC_ACQUIRE 34 #define LE_ATOMIC_ORDER_RELEASE __ATOMIC_RELEASE 39 #define LE_ATOMIC_ORDER_ACQ_REL __ATOMIC_ACQ_REL 48 #define LE_ATOMIC_TEST_AND_SET(ptr, order) __atomic_test_and_set((ptr), (order)) 55 #define LE_ATOMIC_ADD_FETCH(ptr, value, order) __sync_add_and_fetch((ptr), (value)) 62 #define LE_ATOMIC_SUB_FETCH(ptr, value, order) __sync_sub_and_fetch((ptr), (value)) 69 #define LE_ATOMIC_OR_FETCH(ptr, value, order) __sync_or_and_fetch((ptr), (value)) 76 #define LE_ATOMIC_AND_FETCH(ptr, value, order) __sync_and_and_fetch((ptr), (value)) 84 #define LE_SYNC_BOOL_COMPARE_AND_SWAP(ptr, oldval, newval) \ 85 __sync_bool_compare_and_swap((ptr), (oldval), (newval)) 90 #ifndef LE_ATOMIC_ORDER_RELAXED 91 #error "The frameworkAdaptor is missing a definition of LE_ATOMIC_ORDER_RELAXED" 94 #ifndef LE_ATOMIC_ORDER_ACQUIRE 95 #error "The frameworkAdaptor is missing a definition of LE_ATOMIC_ORDER_ACQUIRE" 98 #ifndef LE_ATOMIC_ORDER_RELEASE 99 #error "The frameworkAdaptor is missing a definition of LE_ATOMIC_ORDER_RELEASE" 102 #ifndef LE_ATOMIC_ORDER_ACQ_REL 103 #error "The frameworkAdaptor is missing a definition of LE_ATOMIC_ORDER_ACQ_REL" 106 #ifndef LE_ATOMIC_TEST_AND_SET 107 #error "The frameworkAdaptor is missing a definition of LE_ATOMIC_TEST_AND_SET" 110 #ifndef LE_ATOMIC_ADD_FETCH 111 #error "The frameworkAdaptor is missing a definition of LE_ATOMIC_ADD_FETCH" 114 #ifndef LE_ATOMIC_SUB_FETCH 115 #error "The frameworkAdaptor is missing a definition of LE_ATOMIC_SUB_FETCH" 118 #ifndef LE_ATOMIC_OR_FETCH 119 #error "The frameworkAdaptor is missing a definition of LE_ATOMIC_OR_FETCH" 122 #ifndef LE_ATOMIC_AND_FETCH 123 #error "The frameworkAdaptor is missing a definition of LE_ATOMIC_AND_FETCH" 126 #ifndef LE_SYNC_BOOL_COMPARE_AND_SWAP 127 #error "The frameworkAdaptor is missing a definition of LE_SYNC_BOOL_COMPARE_AND_SWAP" 132 #endif // LEGATO_ATOMIC_INCLUDE_GUARD