|
|
@ -23,7 +23,9 @@ |
|
|
|
__atomic_* interface. */ |
|
|
|
__atomic_* interface. */ |
|
|
|
#include <grpc/impl/codegen/port_platform.h> |
|
|
|
#include <grpc/impl/codegen/port_platform.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
|
|
|
|
extern "C" { |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
typedef intptr_t gpr_atm; |
|
|
|
typedef intptr_t gpr_atm; |
|
|
|
#define GPR_ATM_MAX INTPTR_MAX |
|
|
|
#define GPR_ATM_MAX INTPTR_MAX |
|
|
@ -82,6 +84,8 @@ static __inline int gpr_atm_full_cas(gpr_atm* p, gpr_atm o, gpr_atm n) { |
|
|
|
#define gpr_atm_full_xchg(p, n) \ |
|
|
|
#define gpr_atm_full_xchg(p, n) \ |
|
|
|
GPR_ATM_INC_CAS_THEN(__atomic_exchange_n((p), (n), __ATOMIC_ACQ_REL)) |
|
|
|
GPR_ATM_INC_CAS_THEN(__atomic_exchange_n((p), (n), __ATOMIC_ACQ_REL)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#endif /* GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H */ |
|
|
|
#endif /* GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H */ |
|
|
|