#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/timer_manager.h"
#include <inttypes.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/crash.h"
#include "src/core/lib/gprpp/thd.h"
#include "src/core/lib/iomgr/timer.h"
struct completed_thread { … };
extern grpc_core::TraceFlag grpc_timer_check_trace;
static gpr_mu g_mu;
static bool g_threaded;
static gpr_cv g_cv_wait;
static gpr_cv g_cv_shutdown;
static int g_thread_count;
static int g_waiter_count;
static completed_thread* g_completed_threads;
static bool g_kicked;
static bool g_has_timed_waiter;
static grpc_core::Timestamp g_timed_waiter_deadline;
static uint64_t g_timed_waiter_generation;
static uint64_t g_wakeups;
static void timer_thread(void* completed_thread_ptr);
static void gc_completed_threads(void) { … }
static void start_timer_thread_and_unlock(void) { … }
void grpc_timer_manager_tick() { … }
static void run_some_timers() { … }
static bool wait_until(grpc_core::Timestamp next) { … }
static void timer_main_loop() { … }
static void timer_thread_cleanup(completed_thread* ct) { … }
static void timer_thread(void* completed_thread_ptr) { … }
static void start_threads(void) { … }
void grpc_timer_manager_init(void) { … }
static void stop_threads(void) { … }
void grpc_timer_manager_shutdown(void) { … }
void grpc_timer_manager_set_threading(bool enabled) { … }
void grpc_kick_poller(void) { … }
uint64_t grpc_timer_manager_get_wakeups_testonly(void) { … }