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

Function thread_yield_timed_callback

src/lib/thread.c:217–230  ·  view source on GitHub ↗

Don't inline this function so the timeout_callback won't have its storage * space on the stack cleaned up before the call to schedule(). */

Source from the content-addressed store, hash-verified

215/* Don't inline this function so the timeout_callback won't have its storage
216 * space on the stack cleaned up before the call to schedule(). */
217static int __attribute__((noinline))
218thread_yield_timed_callback(struct timeout_callback *tocb,
219 unsigned int microsecs)
220{
221 tocb->priv = current_thread();
222 tocb->callback = thread_resume_from_timeout;
223
224 if (timer_sched_callback(tocb, microsecs))
225 return -1;
226
227 /* The timer callback will wake up the current thread. */
228 schedule(NULL);
229 return 0;
230}
231
232static void *thread_alloc_space(struct thread *t, size_t bytes)
233{

Callers 1

Calls 3

current_threadFunction · 0.85
timer_sched_callbackFunction · 0.85
scheduleFunction · 0.85

Tested by

no test coverage detected