diff options
author | Craig Tiller <ctiller@google.com> | 2016-09-12 11:56:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-12 11:56:39 -0700 |
commit | 537f7c2a136641487febeac89a25e430029eb40c (patch) | |
tree | 0ca276fbe0dac5c2be06d8ba74ac2193cdd3f550 /include | |
parent | ec5c93cabfbf535be2528df55ca8bb4500e6bc9b (diff) |
Revert "Grand unified closures"
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc/impl/codegen/atm.h | 3 | ||||
-rw-r--r-- | include/grpc/impl/codegen/atm_gcc_atomic.h | 2 | ||||
-rw-r--r-- | include/grpc/impl/codegen/atm_gcc_sync.h | 8 | ||||
-rw-r--r-- | include/grpc/impl/codegen/atm_windows.h | 4 |
4 files changed, 0 insertions, 17 deletions
diff --git a/include/grpc/impl/codegen/atm.h b/include/grpc/impl/codegen/atm.h index ae00fb0f16..5589d5d411 100644 --- a/include/grpc/impl/codegen/atm.h +++ b/include/grpc/impl/codegen/atm.h @@ -75,9 +75,6 @@ int gpr_atm_no_barrier_cas(gpr_atm *p, gpr_atm o, gpr_atm n); int gpr_atm_acq_cas(gpr_atm *p, gpr_atm o, gpr_atm n); int gpr_atm_rel_cas(gpr_atm *p, gpr_atm o, gpr_atm n); - - // Atomically, set *p=n and return the old value of *p - gpr_atm gpr_atm_full_xchg(gpr_atm *p, gpr_atm n); */ #include <grpc/impl/codegen/port_platform.h> diff --git a/include/grpc/impl/codegen/atm_gcc_atomic.h b/include/grpc/impl/codegen/atm_gcc_atomic.h index 7d4ae98cf7..8caf7edbde 100644 --- a/include/grpc/impl/codegen/atm_gcc_atomic.h +++ b/include/grpc/impl/codegen/atm_gcc_atomic.h @@ -69,6 +69,4 @@ static __inline int gpr_atm_rel_cas(gpr_atm *p, gpr_atm o, gpr_atm n) { __ATOMIC_RELAXED); } -#define gpr_atm_full_xchg(p, n) __atomic_exchange_n((p), (n), __ATOMIC_ACQ_REL) - #endif /* GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H */ diff --git a/include/grpc/impl/codegen/atm_gcc_sync.h b/include/grpc/impl/codegen/atm_gcc_sync.h index 9aa2b43189..915b09fb0c 100644 --- a/include/grpc/impl/codegen/atm_gcc_sync.h +++ b/include/grpc/impl/codegen/atm_gcc_sync.h @@ -84,12 +84,4 @@ static __inline void gpr_atm_no_barrier_store(gpr_atm *p, gpr_atm value) { #define gpr_atm_acq_cas(p, o, n) (__sync_bool_compare_and_swap((p), (o), (n))) #define gpr_atm_rel_cas(p, o, n) gpr_atm_acq_cas((p), (o), (n)) -static __inline gpr_atm gpr_atm_full_xchg(gpr_atm *p, gpr_atm n) { - gpr_atm cur; - do { - cur = gpr_atm_acq_load(p); - } while (!gpr_atm_rel_cas(p, cur, n)); - return cur; -} - #endif /* GRPC_IMPL_CODEGEN_ATM_GCC_SYNC_H */ diff --git a/include/grpc/impl/codegen/atm_windows.h b/include/grpc/impl/codegen/atm_windows.h index 0ab70b95c4..d5fa8c0f62 100644 --- a/include/grpc/impl/codegen/atm_windows.h +++ b/include/grpc/impl/codegen/atm_windows.h @@ -122,8 +122,4 @@ static __inline gpr_atm gpr_atm_full_fetch_add(gpr_atm *p, gpr_atm delta) { return old; } -static __inline gpr_atm gpr_atm_full_xchg(gpr_atm *p, gpr_atm n) { - return (gpr_atm)InterlockedExchangePointer((PVOID *)p, (PVOID)n); -} - #endif /* GRPC_IMPL_CODEGEN_ATM_WINDOWS_H */ |