GRPC C++  1.39.1
Data Structures | Macros | Functions | Variables
timer_generic.cc File Reference
#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/port.h"
#include <inttypes.h>
#include <string>
#include "absl/strings/str_cat.h"
#include "src/core/lib/iomgr/timer.h"
#include <grpc/support/alloc.h>
#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gpr/spinlock.h"
#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/time_averaged_stats.h"
#include "src/core/lib/iomgr/timer_heap.h"

Data Structures

struct  timer_shard
 
struct  shared_mutables
 

Macros

#define INVALID_HEAP_INDEX   0xffffffffu
 
#define ADD_DEADLINE_SCALE   0.33
 
#define MIN_QUEUE_WINDOW_DURATION   0.01
 
#define MAX_QUEUE_WINDOW_DURATION   1
 
#define NUM_HASH_BUCKETS   1009 /* Prime number close to 1000 */
 
#define INIT_TIMER_HASH_TABLE()   init_timer_ht()
 
#define DESTROY_TIMER_HASH_TABLE()   destroy_timer_ht()
 
#define ADD_TO_HASH_TABLE(t)   add_to_ht((t))
 
#define REMOVE_FROM_HASH_TABLE(t)   remove_from_ht((t))
 
#define VALIDATE_NON_PENDING_TIMER(t)   validate_non_pending_timer((t))
 

Functions

struct shared_mutables GPR_ALIGN_STRUCT (GPR_CACHELINE_SIZE)
 
void grpc_timer_init_unset (grpc_timer *timer)
 

Variables

grpc_core::TraceFlag grpc_timer_trace (false, "timer")
 
grpc_core::TraceFlag grpc_timer_check_trace (false, "timer_check")
 
grpc_millis min_timer
 
gpr_spinlock checker_mu
 
bool initialized
 
gpr_mu mu
 
grpc_timer_vtable grpc_generic_timer_vtable
 

Macro Definition Documentation

◆ ADD_DEADLINE_SCALE

#define ADD_DEADLINE_SCALE   0.33

◆ ADD_TO_HASH_TABLE

#define ADD_TO_HASH_TABLE (   t)    add_to_ht((t))

◆ DESTROY_TIMER_HASH_TABLE

#define DESTROY_TIMER_HASH_TABLE ( )    destroy_timer_ht()

◆ INIT_TIMER_HASH_TABLE

#define INIT_TIMER_HASH_TABLE ( )    init_timer_ht()

◆ INVALID_HEAP_INDEX

#define INVALID_HEAP_INDEX   0xffffffffu

◆ MAX_QUEUE_WINDOW_DURATION

#define MAX_QUEUE_WINDOW_DURATION   1

◆ MIN_QUEUE_WINDOW_DURATION

#define MIN_QUEUE_WINDOW_DURATION   0.01

◆ NUM_HASH_BUCKETS

#define NUM_HASH_BUCKETS   1009 /* Prime number close to 1000 */

◆ REMOVE_FROM_HASH_TABLE

#define REMOVE_FROM_HASH_TABLE (   t)    remove_from_ht((t))

◆ VALIDATE_NON_PENDING_TIMER

#define VALIDATE_NON_PENDING_TIMER (   t)    validate_non_pending_timer((t))

Function Documentation

◆ GPR_ALIGN_STRUCT()

struct shared_mutables GPR_ALIGN_STRUCT ( GPR_CACHELINE_SIZE  )

◆ grpc_timer_init_unset()

void grpc_timer_init_unset ( grpc_timer timer)

Variable Documentation

◆ checker_mu

gpr_spinlock checker_mu

◆ grpc_generic_timer_vtable

grpc_timer_vtable grpc_generic_timer_vtable
Initial value:
= {
timer_init, timer_cancel, timer_check,
timer_list_init, timer_list_shutdown, timer_consume_kick}

◆ grpc_timer_check_trace

grpc_core::TraceFlag grpc_timer_check_trace(false, "timer_check") ( false  ,
"timer_check"   
)

◆ grpc_timer_trace

grpc_core::TraceFlag grpc_timer_trace(false, "timer") ( false  ,
"timer"   
)

◆ initialized

bool initialized

◆ min_timer

grpc_millis min_timer

◆ mu

gpr_mu mu