diff options
author | Soheil Hassas Yeganeh <soheil@google.com> | 2018-11-28 13:15:24 -0500 |
---|---|---|
committer | Soheil Hassas Yeganeh <soheil@google.com> | 2018-11-28 15:06:57 -0500 |
commit | 9128881b6d97059170270936a13ee7c90f35b30a (patch) | |
tree | 4e48d459ee4d8daceb89175b66cd52950ed21c6d /include/grpc | |
parent | 5ede895caf13fa60ee632c25bfcb546983ee68ef (diff) |
Add GPR_ATM_INC_ADD_THEN to grpc_core::RefCount
This is to fix the wrong atomic op counts reported by benchmarks.
Also add these macros to windows and gcc-sync headers as noop macros for
consistency.
Diffstat (limited to 'include/grpc')
-rw-r--r-- | include/grpc/impl/codegen/atm_gcc_sync.h | 2 | ||||
-rw-r--r-- | include/grpc/impl/codegen/atm_windows.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/grpc/impl/codegen/atm_gcc_sync.h b/include/grpc/impl/codegen/atm_gcc_sync.h index c0010a3469..728c3d5412 100644 --- a/include/grpc/impl/codegen/atm_gcc_sync.h +++ b/include/grpc/impl/codegen/atm_gcc_sync.h @@ -26,6 +26,8 @@ typedef intptr_t gpr_atm; #define GPR_ATM_MAX INTPTR_MAX #define GPR_ATM_MIN INTPTR_MIN +#define GPR_ATM_INC_CAS_THEN(blah) blah +#define GPR_ATM_INC_ADD_THEN(blah) blah #define GPR_ATM_COMPILE_BARRIER_() __asm__ __volatile__("" : : : "memory") diff --git a/include/grpc/impl/codegen/atm_windows.h b/include/grpc/impl/codegen/atm_windows.h index f6b27e5df7..c016b90095 100644 --- a/include/grpc/impl/codegen/atm_windows.h +++ b/include/grpc/impl/codegen/atm_windows.h @@ -25,6 +25,8 @@ typedef intptr_t gpr_atm; #define GPR_ATM_MAX INTPTR_MAX #define GPR_ATM_MIN INTPTR_MIN +#define GPR_ATM_INC_CAS_THEN(blah) blah +#define GPR_ATM_INC_ADD_THEN(blah) blah #define gpr_atm_full_barrier MemoryBarrier |