Go to the documentation of this file.
38 if (
first[parent]->deadline <= t->deadline)
break;
54 if (left_child >=
length)
break;
55 uint32_t right_child = left_child + 1;
57 first[right_child]->deadline
60 if (t->deadline <=
first[next_i]->deadline)
break;
69 #define SHRINK_MIN_ELEMS 8
70 #define SHRINK_FULLNESS_FACTOR 2
73 if (
heap->timer_count >= 8 &&
84 if (
heap->timers[parent]->deadline >
timer->deadline) {
98 if (
heap->timer_count ==
heap->timer_capacity) {
99 heap->timer_capacity =
107 return timer->heap_index == 0;
112 if (
i ==
heap->timer_count - 1) {
118 heap->timers[
i]->heap_index =
i;
125 return heap->timer_count == 0;
129 return heap->timers[0];
static void adjust_upwards(grpc_timer **first, uint32_t i, grpc_timer *t)
return memset(p, 0, total)
void grpc_timer_heap_remove(grpc_timer_heap *heap, grpc_timer *timer)
GPRAPI void gpr_free(void *ptr)
OPENSSL_EXPORT pem_password_cb void * u
static void maybe_shrink(grpc_timer_heap *heap)
void grpc_timer_heap_destroy(grpc_timer_heap *heap)
bool grpc_timer_heap_add(grpc_timer_heap *heap, grpc_timer *timer)
GPRAPI void * gpr_realloc(void *p, size_t size)
static void note_changed_priority(grpc_timer_heap *heap, grpc_timer *timer)
#define SHRINK_FULLNESS_FACTOR
void grpc_timer_heap_init(grpc_timer_heap *heap)
bool grpc_timer_heap_is_empty(grpc_timer_heap *heap)
void grpc_timer_heap_pop(grpc_timer_heap *heap)
grpc_timer * grpc_timer_heap_top(grpc_timer_heap *heap)
static void adjust_downwards(grpc_timer **first, uint32_t i, uint32_t length, grpc_timer *t)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:39