GRPC Core  10.0.0
Macros | Typedefs
atm_gcc_sync.h File Reference
#include <grpc/impl/codegen/port_platform.h>

Go to the source code of this file.

Macros

#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")
 
#define GPR_ATM_LS_BARRIER_()   gpr_atm_full_barrier()
 
#define gpr_atm_full_barrier()   (__sync_synchronize())
 
#define gpr_atm_no_barrier_fetch_add(p, delta)   gpr_atm_full_fetch_add((p), (delta))
 
#define gpr_atm_full_fetch_add(p, delta)   (__sync_fetch_and_add((p), (delta)))
 
#define gpr_atm_no_barrier_cas(p, o, n)   gpr_atm_acq_cas((p), (o), (n))
 
#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))
 
#define gpr_atm_full_cas(p, o, n)   gpr_atm_acq_cas((p), (o), (n))
 

Typedefs

typedef intptr_t gpr_atm
 

Macro Definition Documentation

◆ gpr_atm_acq_cas

#define gpr_atm_acq_cas (   p,
  o,
 
)    (__sync_bool_compare_and_swap((p), (o), (n)))

◆ GPR_ATM_COMPILE_BARRIER_

#define GPR_ATM_COMPILE_BARRIER_ ( )    __asm__ __volatile__("" : : : "memory")

◆ gpr_atm_full_barrier

#define gpr_atm_full_barrier ( )    (__sync_synchronize())

◆ gpr_atm_full_cas

#define gpr_atm_full_cas (   p,
  o,
 
)    gpr_atm_acq_cas((p), (o), (n))

◆ gpr_atm_full_fetch_add

#define gpr_atm_full_fetch_add (   p,
  delta 
)    (__sync_fetch_and_add((p), (delta)))

◆ GPR_ATM_INC_ADD_THEN

#define GPR_ATM_INC_ADD_THEN (   blah)    blah

◆ GPR_ATM_INC_CAS_THEN

#define GPR_ATM_INC_CAS_THEN (   blah)    blah

◆ GPR_ATM_LS_BARRIER_

#define GPR_ATM_LS_BARRIER_ ( )    gpr_atm_full_barrier()

◆ GPR_ATM_MAX

#define GPR_ATM_MAX   INTPTR_MAX

◆ GPR_ATM_MIN

#define GPR_ATM_MIN   INTPTR_MIN

◆ gpr_atm_no_barrier_cas

#define gpr_atm_no_barrier_cas (   p,
  o,
 
)    gpr_atm_acq_cas((p), (o), (n))

◆ gpr_atm_no_barrier_fetch_add

#define gpr_atm_no_barrier_fetch_add (   p,
  delta 
)    gpr_atm_full_fetch_add((p), (delta))

◆ gpr_atm_rel_cas

#define gpr_atm_rel_cas (   p,
  o,
 
)    gpr_atm_acq_cas((p), (o), (n))

Typedef Documentation

◆ gpr_atm

typedef intptr_t gpr_atm