MCPcopy Create free account
hub / github.com/coreboot/coreboot / timer_sched_callback

Function timer_sched_callback

src/lib/timer_queue.c:151–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151int timer_sched_callback(struct timeout_callback *tocb, uint64_t us)
152{
153 struct mono_time current_time;
154
155 if ((long)us < 0)
156 return -1;
157
158 timer_monotonic_get(&current_time);
159 tocb->expiration = current_time;
160 mono_time_add_usecs(&tocb->expiration, us);
161
162 /* The expiration overflowed. */
163 if (us != 0 && !mono_time_before(&current_time, &tocb->expiration))
164 return -1;
165
166 return timer_queue_insert(&global_timer_queue, tocb);
167}
168
169int timers_run(void)
170{

Callers 1

Calls 4

mono_time_add_usecsFunction · 0.85
mono_time_beforeFunction · 0.85
timer_queue_insertFunction · 0.85
timer_monotonic_getFunction · 0.50

Tested by

no test coverage detected