Missing extern C in public API

pull/13147/head
Yash Tibrewal 7 years ago
parent 39aed1ae8b
commit 589e58316a
  1. 8
      include/grpc/impl/codegen/atm.h
  2. 8
      include/grpc/impl/codegen/atm_gcc_atomic.h

@ -79,9 +79,17 @@
#error could not determine platform for atm
#endif
#ifdef __cplusplus
extern "C" {
#endif
/** Adds \a delta to \a *value, clamping the result to the range specified
by \a min and \a max. Returns the new value. */
gpr_atm gpr_atm_no_barrier_clamped_add(gpr_atm *value, gpr_atm delta,
gpr_atm min, gpr_atm max);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_ATM_H */

@ -23,6 +23,10 @@
__atomic_* interface. */
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef intptr_t gpr_atm;
#define GPR_ATM_MAX INTPTR_MAX
#define GPR_ATM_MIN INTPTR_MIN
@ -80,4 +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) \
GPR_ATM_INC_CAS_THEN(__atomic_exchange_n((p), (n), __ATOMIC_ACQ_REL))
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H */

Loading…
Cancel
Save