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

Function prepare_thread

src/lib/thread.c:176–191  ·  view source on GitHub ↗

Prepare a thread so that it starts by executing thread_entry(thread_arg). * Within thread_entry() it will call func(arg). */

Source from the content-addressed store, hash-verified

174/* Prepare a thread so that it starts by executing thread_entry(thread_arg).
175 * Within thread_entry() it will call func(arg). */
176static void prepare_thread(struct thread *t, struct thread_handle *handle,
177 enum cb_err (*func)(void *), void *arg,
178 asmlinkage void (*thread_entry)(void *), void *thread_arg)
179{
180 /* Stash the function and argument to run. */
181 t->entry = func;
182 t->entry_arg = arg;
183
184 /* All new threads can yield by default. */
185 t->can_yield = 1;
186
187 /* Pointer used to publish the state of thread */
188 t->handle = handle;
189
190 arch_prepare_thread(t, thread_entry, thread_arg);
191}
192
193static void thread_resume_from_timeout(struct timeout_callback *tocb)
194{

Callers 3

idle_thread_initFunction · 0.85
thread_runFunction · 0.85
thread_run_untilFunction · 0.85

Calls 1

arch_prepare_threadFunction · 0.50

Tested by

no test coverage detected