17 #ifndef _RTEMS_SCORE_ATOMIC_H 18 #define _RTEMS_SCORE_ATOMIC_H 20 #include <rtems/score/cpuatomic.h> 37 typedef CPU_atomic_Uint Atomic_Uint;
39 typedef CPU_atomic_Ulong Atomic_Ulong;
41 typedef CPU_atomic_Uintptr Atomic_Uintptr;
43 typedef CPU_atomic_Flag Atomic_Flag;
45 typedef CPU_atomic_Order Atomic_Order;
47 #define ATOMIC_ORDER_RELAXED CPU_ATOMIC_ORDER_RELAXED 49 #define ATOMIC_ORDER_ACQUIRE CPU_ATOMIC_ORDER_ACQUIRE 51 #define ATOMIC_ORDER_RELEASE CPU_ATOMIC_ORDER_RELEASE 53 #define ATOMIC_ORDER_ACQ_REL CPU_ATOMIC_ORDER_ACQ_REL 55 #define ATOMIC_ORDER_SEQ_CST CPU_ATOMIC_ORDER_SEQ_CST 57 #define ATOMIC_INITIALIZER_UINT( value ) CPU_ATOMIC_INITIALIZER_UINT( value ) 59 #define ATOMIC_INITIALIZER_ULONG( value ) CPU_ATOMIC_INITIALIZER_ULONG( value ) 61 #define ATOMIC_INITIALIZER_UINTPTR( value ) CPU_ATOMIC_INITIALIZER_UINTPTR( value ) 63 #define ATOMIC_INITIALIZER_FLAG CPU_ATOMIC_INITIALIZER_FLAG 65 #define _Atomic_Fence( order ) _CPU_atomic_Fence( order ) 67 #define _Atomic_Init_uint( obj, desired ) \ 68 _CPU_atomic_Init_uint( obj, desired ) 70 #define _Atomic_Init_ulong( obj, desired ) \ 71 _CPU_atomic_Init_ulong( obj, desired ) 73 #define _Atomic_Init_uintptr( obj, desired ) \ 74 _CPU_atomic_Init_uintptr( obj, desired ) 76 #define _Atomic_Load_uint( obj, order ) \ 77 _CPU_atomic_Load_uint( obj, order ) 79 #define _Atomic_Load_ulong( obj, order ) \ 80 _CPU_atomic_Load_ulong( obj, order ) 82 #define _Atomic_Load_uintptr( obj, order ) \ 83 _CPU_atomic_Load_uintptr( obj, order ) 85 #define _Atomic_Store_uint( obj, desr, order ) \ 86 _CPU_atomic_Store_uint( obj, desr, order ) 88 #define _Atomic_Store_ulong( obj, desr, order ) \ 89 _CPU_atomic_Store_ulong( obj, desr, order ) 91 #define _Atomic_Store_uintptr( obj, desr, order ) \ 92 _CPU_atomic_Store_uintptr( obj, desr, order ) 94 #define _Atomic_Fetch_add_uint( obj, arg, order ) \ 95 _CPU_atomic_Fetch_add_uint( obj, arg, order ) 97 #define _Atomic_Fetch_add_ulong( obj, arg, order ) \ 98 _CPU_atomic_Fetch_add_ulong( obj, arg, order ) 100 #define _Atomic_Fetch_add_uintptr( obj, arg, order ) \ 101 _CPU_atomic_Fetch_add_uintptr( obj, arg, order ) 103 #define _Atomic_Fetch_sub_uint( obj, arg, order ) \ 104 _CPU_atomic_Fetch_sub_uint( obj, arg, order ) 106 #define _Atomic_Fetch_sub_ulong( obj, arg, order ) \ 107 _CPU_atomic_Fetch_sub_ulong( obj, arg, order ) 109 #define _Atomic_Fetch_sub_uintptr( obj, arg, order ) \ 110 _CPU_atomic_Fetch_sub_uintptr( obj, arg, order ) 112 #define _Atomic_Fetch_or_uint( obj, arg, order ) \ 113 _CPU_atomic_Fetch_or_uint( obj, arg, order ) 115 #define _Atomic_Fetch_or_ulong( obj, arg, order ) \ 116 _CPU_atomic_Fetch_or_ulong( obj, arg, order ) 118 #define _Atomic_Fetch_or_uintptr( obj, arg, order ) \ 119 _CPU_atomic_Fetch_or_uintptr( obj, arg, order ) 121 #define _Atomic_Fetch_and_uint( obj, arg, order ) \ 122 _CPU_atomic_Fetch_and_uint( obj, arg, order ) 124 #define _Atomic_Fetch_and_ulong( obj, arg, order ) \ 125 _CPU_atomic_Fetch_and_ulong( obj, arg, order ) 127 #define _Atomic_Fetch_and_uintptr( obj, arg, order ) \ 128 _CPU_atomic_Fetch_and_uintptr( obj, arg, order ) 130 #define _Atomic_Exchange_uint( obj, desr, order ) \ 131 _CPU_atomic_Exchange_uint( obj, desr, order ) 133 #define _Atomic_Exchange_ulong( obj, desr, order ) \ 134 _CPU_atomic_Exchange_ulong( obj, desr, order ) 136 #define _Atomic_Exchange_uintptr( obj, desr, order ) \ 137 _CPU_atomic_Exchange_uintptr( obj, desr, order ) 139 #define _Atomic_Compare_exchange_uint( obj, expected, desired, succ, fail ) \ 140 _CPU_atomic_Compare_exchange_uint( obj, expected, desired, succ, fail ) 142 #define _Atomic_Compare_exchange_ulong( obj, expected, desired, succ, fail ) \ 143 _CPU_atomic_Compare_exchange_ulong( obj, expected, desired, succ, fail ) 145 #define _Atomic_Compare_exchange_uintptr( obj, expected, desired, succ, fail ) \ 146 _CPU_atomic_Compare_exchange_uintptr( obj, expected, desired, succ, fail ) 148 #define _Atomic_Flag_clear( obj, order ) \ 149 _CPU_atomic_Flag_clear( obj, order ) 151 #define _Atomic_Flag_test_and_set( obj, order ) \ 152 _CPU_atomic_Flag_test_and_set( obj, order )