00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #define _ATOMIC_MEMBER_ ((__a)->_M_i)
00034
00035
00036 struct __atomic_bool_base
00037 {
00038 bool _M_i;
00039 };
00040
00041 struct __atomic_char_base
00042 {
00043 char _M_i;
00044 };
00045
00046 struct __atomic_schar_base
00047 {
00048 signed char _M_i;
00049 };
00050
00051 struct __atomic_uchar_base
00052 {
00053 unsigned char _M_i;
00054 };
00055
00056 struct __atomic_short_base
00057 {
00058 short _M_i;
00059 };
00060
00061 struct __atomic_ushort_base
00062 {
00063 unsigned short _M_i;
00064 };
00065
00066 struct __atomic_int_base
00067 {
00068 int _M_i;
00069 };
00070
00071 struct __atomic_uint_base
00072 {
00073 unsigned int _M_i;
00074 };
00075
00076 struct __atomic_long_base
00077 {
00078 long _M_i;
00079 };
00080
00081 struct __atomic_ulong_base
00082 {
00083 unsigned long _M_i;
00084 };
00085
00086 struct __atomic_llong_base
00087 {
00088 long long _M_i;
00089 };
00090
00091 struct __atomic_ullong_base
00092 {
00093 unsigned long long _M_i;
00094 };
00095
00096 struct __atomic_wchar_t_base
00097 {
00098 wchar_t _M_i;
00099 };
00100
00101 typedef struct __atomic_flag_base atomic_flag;
00102 typedef struct __atomic_address_base atomic_address;
00103 typedef struct __atomic_bool_base atomic_bool;
00104 typedef struct __atomic_char_base atomic_char;
00105 typedef struct __atomic_schar_base atomic_schar;
00106 typedef struct __atomic_uchar_base atomic_uchar;
00107 typedef struct __atomic_short_base atomic_short;
00108 typedef struct __atomic_ushort_base atomic_ushort;
00109 typedef struct __atomic_int_base atomic_int;
00110 typedef struct __atomic_uint_base atomic_uint;
00111 typedef struct __atomic_long_base atomic_long;
00112 typedef struct __atomic_ulong_base atomic_ulong;
00113 typedef struct __atomic_llong_base atomic_llong;
00114 typedef struct __atomic_ullong_base atomic_ullong;
00115 typedef struct __atomic_wchar_t_base atomic_wchar_t;
00116 typedef struct __atomic_short_base atomic_char16_t;
00117 typedef struct __atomic_int_base atomic_char32_t;
00118
00119 #define atomic_is_lock_free(__a) \
00120 false
00121
00122 #define atomic_load_explicit(__a, __x) \
00123 _ATOMIC_LOAD_(__a, __x)
00124
00125 #define atomic_load(__a) \
00126 atomic_load_explicit(__a, memory_order_seq_cst)
00127
00128 #define atomic_store_explicit(__a, __m, __x) \
00129 _ATOMIC_STORE_(__a, __m, __x)
00130
00131 #define atomic_store(__a, __m) \
00132 atomic_store_explicit(__a, __m, memory_order_seq_cst)
00133
00134 #define atomic_exchange_explicit(__a, __m, __x) \
00135 _ATOMIC_MODIFY_(__a, =, __m, __x)
00136
00137 #define atomic_exchange(__a, __m) \
00138 atomic_exchange_explicit(__a, __m, memory_order_seq_cst)
00139
00140 #define atomic_compare_exchange_explicit(__a, __e, __m, __x, __y) \
00141 _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x)
00142
00143 #define atomic_compare_exchange(__a, __e, __m) \
00144 _ATOMIC_CMPEXCHNG_(__a, __e, __m, memory_order_seq_cst)
00145
00146 #define atomic_fetch_add_explicit(__a, __m, __x) \
00147 _ATOMIC_MODIFY_(__a, +=, __m, __x)
00148
00149 #define atomic_fetch_add(__a, __m) \
00150 atomic_fetch_add_explicit(__a, __m, memory_order_seq_cst)
00151
00152 #define atomic_fetch_sub_explicit(__a, __m, __x) \
00153 _ATOMIC_MODIFY_(__a, -=, __m, __x)
00154
00155 #define atomic_fetch_sub(__a, __m) \
00156 atomic_fetch_sub_explicit(__a, __m, memory_order_seq_cst)
00157
00158 #define atomic_fetch_and_explicit(__a, __m, __x) \
00159 _ATOMIC_MODIFY_(__a, &=, __m, __x)
00160
00161 #define atomic_fetch_and(__a, __m) \
00162 atomic_fetch_and_explicit(__a, __m, memory_order_seq_cst)
00163
00164 #define atomic_fetch_or_explicit(__a, __m, __x) \
00165 _ATOMIC_MODIFY_(__a, |=, __m, __x)
00166
00167 #define atomic_fetch_or(__a, __m) \
00168 atomic_fetch_or_explicit(__a, __m, memory_order_seq_cst)
00169
00170 #define atomic_fetch_xor_explicit(__a, __m, __x) \
00171 _ATOMIC_MODIFY_(__a, ^=, __m, __x)
00172
00173 #define atomic_fetch_xor(__a, __m) \
00174 atomic_fetch_xor_explicit(__a, __m, memory_order_seq_cst)