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

Function get_free_thread

src/lib/thread.c:80–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80static inline struct thread *get_free_thread(void)
81{
82 struct thread *t;
83
84 t = pop_thread(&free_threads);
85 if (t == NULL)
86 return NULL;
87
88 /* Reset the current stack value to the original. */
89 if (!t->stack_orig)
90 die("%s: Invalid stack value\n", __func__);
91
92 t->stack_current = t->stack_orig;
93
94 return t;
95}
96
97static inline void free_thread(struct thread *t)
98{

Callers 3

idle_thread_initFunction · 0.85
thread_runFunction · 0.85
thread_run_untilFunction · 0.85

Calls 2

pop_threadFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected