|
|
|
@ -429,7 +429,8 @@ static void timer_init(grpc_timer* timer, grpc_millis deadline, |
|
|
|
|
note_deadline_change(shard); |
|
|
|
|
if (shard->shard_queue_index == 0 && deadline < old_min_deadline) { |
|
|
|
|
#if GPR_ARCH_64 |
|
|
|
|
gpr_atm_no_barrier_store(&g_shared_mutables.min_timer, deadline); |
|
|
|
|
gpr_atm_no_barrier_store( |
|
|
|
|
static_cast<gpr_atm*>(&g_shared_mutables.min_timer), deadline); |
|
|
|
|
#else |
|
|
|
|
// On 32-bit systems, gpr_atm_no_barrier_store does not work on 64-bit
|
|
|
|
|
// types (like grpc_millis). So all reads and writes to
|
|
|
|
@ -577,7 +578,8 @@ static grpc_timer_check_result run_some_expired_timers(grpc_millis now, |
|
|
|
|
grpc_timer_check_result result = GRPC_TIMERS_NOT_CHECKED; |
|
|
|
|
|
|
|
|
|
#if GPR_ARCH_64 |
|
|
|
|
grpc_millis min_timer = gpr_atm_no_barrier_load(&g_shared_mutables.min_timer); |
|
|
|
|
grpc_millis min_timer = static_cast<grpc_millis>(gpr_atm_no_barrier_load( |
|
|
|
|
static_cast<gpr_atm*>(&g_shared_mutables.min_timer))); |
|
|
|
|
gpr_tls_set(&g_last_seen_min_timer, min_timer); |
|
|
|
|
#else |
|
|
|
|
// On 32-bit systems, gpr_atm_no_barrier_load does not work on 64-bit types
|
|
|
|
@ -637,8 +639,9 @@ static grpc_timer_check_result run_some_expired_timers(grpc_millis now, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if GPR_ARCH_64 |
|
|
|
|
gpr_atm_no_barrier_store(&g_shared_mutables.min_timer, |
|
|
|
|
g_shard_queue[0]->min_deadline); |
|
|
|
|
gpr_atm_no_barrier_store( |
|
|
|
|
static_cast<gpr_atm*>(&g_shared_mutables.min_timer), |
|
|
|
|
g_shard_queue[0]->min_deadline); |
|
|
|
|
#else |
|
|
|
|
// On 32-bit systems, gpr_atm_no_barrier_store does not work on 64-bit
|
|
|
|
|
// types (like grpc_millis). So all reads and writes to
|
|
|
|
@ -702,7 +705,8 @@ static grpc_timer_check_result timer_check(grpc_millis* next) { |
|
|
|
|
"TIMER CHECK BEGIN: now=%" PRId64 " next=%s tls_min=%" PRId64 |
|
|
|
|
" glob_min=%" PRId64, |
|
|
|
|
now, next_str, min_timer, |
|
|
|
|
gpr_atm_no_barrier_load(&g_shared_mutables.min_timer)); |
|
|
|
|
gpr_atm_no_barrier_load( |
|
|
|
|
static_cast<gpr_atm*>(&g_shared_mutables.min_timer))); |
|
|
|
|
#else |
|
|
|
|
gpr_log(GPR_DEBUG, |
|
|
|
|
"TIMER CHECK BEGIN: now=%" PRId64 " next=%s min=%" PRId64, now, |
|
|
|
|