Skip to content
Snippets Groups Projects
Commit c758542d authored by Craig Tiller's avatar Craig Tiller
Browse files

Fix compile

parent edbf2b9d
No related branches found
No related tags found
No related merge requests found
...@@ -70,7 +70,7 @@ typedef struct { ...@@ -70,7 +70,7 @@ typedef struct {
/* Protects g_shard_queue */ /* Protects g_shard_queue */
static gpr_mu g_mu; static gpr_mu g_mu;
/* Allow only one run_some_expired_timers at once */ /* Allow only one run_some_expired_timers at once */
static gpr_spinlock g_checker_mu = GPR_SPINLOCK_INITIALIZER; static gpr_spinlock g_checker_mu = GPR_SPINLOCK_STATIC_INITIALIZER;
static gpr_clock_type g_clock_type; static gpr_clock_type g_clock_type;
static shard_type g_shards[NUM_SHARDS]; static shard_type g_shards[NUM_SHARDS];
/* Protected by g_mu */ /* Protected by g_mu */
......
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
typedef struct { gpr_atm atm; } gpr_spinlock; typedef struct { gpr_atm atm; } gpr_spinlock;
#define GPR_SPINLOCK_INITIALIZER ((gpr_spinlock){0}) #define GPR_SPINLOCK_INITIALIZER ((gpr_spinlock){0})
#define GPR_SPINLOCK_STATIC_INITIALIZER \
{ 0 }
#define gpr_spinlock_trylock(lock) (gpr_atm_acq_cas(&(lock)->atm, 0, 1)) #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)) #define gpr_spinlock_unlock(lock) (gpr_atm_rel_store(&(lock)->atm, 0))
#define gpr_spinlock_lock(lock) \ #define gpr_spinlock_lock(lock) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment