Classes | Macros
src/core/lib/gpr/spinlock.h File Reference
#include <grpc/support/port_platform.h>
#include <grpc/support/atm.h>
Include dependency graph for src/core/lib/gpr/spinlock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  gpr_spinlock
 

Macros

#define GPR_SPINLOCK_INITIALIZER   ((gpr_spinlock){0})
 
#define gpr_spinlock_lock(lock)
 
#define GPR_SPINLOCK_STATIC_INITIALIZER   { 0 }
 
#define gpr_spinlock_trylock(lock)   (gpr_atm_acq_cas(&(lock)->atm, 0, 1))
 
#define gpr_spinlock_unlock(lock)   (gpr_atm_rel_store(&(lock)->atm, 0))
 

Macro Definition Documentation

◆ GPR_SPINLOCK_INITIALIZER

#define GPR_SPINLOCK_INITIALIZER   ((gpr_spinlock){0})

Definition at line 35 of file src/core/lib/gpr/spinlock.h.

◆ gpr_spinlock_lock

#define gpr_spinlock_lock (   lock)
Value:
do { \
} while (!gpr_spinlock_trylock((lock)))

Definition at line 49 of file src/core/lib/gpr/spinlock.h.

◆ GPR_SPINLOCK_STATIC_INITIALIZER

#define GPR_SPINLOCK_STATIC_INITIALIZER   { 0 }

Definition at line 37 of file src/core/lib/gpr/spinlock.h.

◆ gpr_spinlock_trylock

#define gpr_spinlock_trylock (   lock)    (gpr_atm_acq_cas(&(lock)->atm, 0, 1))

Definition at line 40 of file src/core/lib/gpr/spinlock.h.

◆ gpr_spinlock_unlock

#define gpr_spinlock_unlock (   lock)    (gpr_atm_rel_store(&(lock)->atm, 0))

Definition at line 41 of file src/core/lib/gpr/spinlock.h.

gpr_spinlock_trylock
#define gpr_spinlock_trylock(lock)
Definition: src/core/lib/gpr/spinlock.h:40


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:31