Go to the source code of this file.
|
#define | _ATOMIC_MEMBER_ _M_i |
|
#define | _ATOMIC_LOAD_(__a, __x) |
|
#define | _ATOMIC_STORE_(__a, __n, __x) |
|
#define | _ATOMIC_MODIFY_(__a, __o, __n, __x) |
|
#define | _ATOMIC_CMPEXCHNG_(__a, __e, __n, __x) |
|
This is an internal header file, included by other library headers. Do not attempt to use it directly. @headername{atomic}
Definition in file atomic_0.h.
◆ _ATOMIC_CMPEXCHNG_
#define _ATOMIC_CMPEXCHNG_ |
( |
|
__a, |
|
|
|
__e, |
|
|
|
__n, |
|
|
|
__x |
|
) |
| |
Value: ({typedef __typeof__(_ATOMIC_MEMBER_) __i_type; \
__i_type* __p = &_ATOMIC_MEMBER_; \
__typeof__(__e) __q = (__e); \
__typeof__(__n) __w = (__n); \
bool __r; \
__atomic_flag_base* __g = __atomic_flag_for_address(__p); \
__atomic_flag_wait_explicit(__g, __x); \
__i_type __t = *__p; \
if (*__q == __t) \
{ \
*__p = (__i_type)__w; \
__r = true; \
} \
else { *__q = __t; __r = false; } \
atomic_flag_clear_explicit(__g, __x); \
__r; })
◆ _ATOMIC_LOAD_
#define _ATOMIC_LOAD_ |
( |
|
__a, |
|
|
|
__x |
|
) |
| |
Value: ({typedef __typeof__(_ATOMIC_MEMBER_) __i_type; \
__i_type* __p = &_ATOMIC_MEMBER_; \
__atomic_flag_base* __g = __atomic_flag_for_address(__p); \
__atomic_flag_wait_explicit(__g, __x); \
__i_type __r = *__p; \
atomic_flag_clear_explicit(__g, __x); \
__r; })
◆ _ATOMIC_MODIFY_
#define _ATOMIC_MODIFY_ |
( |
|
__a, |
|
|
|
__o, |
|
|
|
__n, |
|
|
|
__x |
|
) |
| |
Value: ({typedef __typeof__(_ATOMIC_MEMBER_) __i_type; \
__i_type* __p = &_ATOMIC_MEMBER_; \
__typeof__(__n) __w = (__n); \
__atomic_flag_base* __g = __atomic_flag_for_address(__p); \
__atomic_flag_wait_explicit(__g, __x); \
__i_type __r = *__p; \
*__p __o __w; \
atomic_flag_clear_explicit(__g, __x); \
__r; })
◆ _ATOMIC_STORE_
#define _ATOMIC_STORE_ |
( |
|
__a, |
|
|
|
__n, |
|
|
|
__x |
|
) |
| |
Value: ({typedef __typeof__(_ATOMIC_MEMBER_) __i_type; \
__i_type* __p = &_ATOMIC_MEMBER_; \
__typeof__(__n) __w = (__n); \
__atomic_flag_base* __g = __atomic_flag_for_address(__p); \
__atomic_flag_wait_explicit(__g, __x); \
*__p = __w; \
atomic_flag_clear_explicit(__g, __x); \
__w; })
◆ _GLIBCXX_VISIBILITY()
namespace std _GLIBCXX_VISIBILITY |
( |
default |
| ) |
|
atomic_flag
Base class for atomic integrals.
Partial specialization for pointer types.
Definition at line 36 of file atomic_0.h.