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

Function thread_join

src/lib/thread.c:404–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404enum cb_err thread_join(struct thread_handle *handle)
405{
406 struct stopwatch sw;
407 struct thread *current = current_thread();
408
409 assert(handle);
410 assert(current);
411 assert(current->handle != handle);
412
413 if (handle->state == THREAD_UNINITIALIZED)
414 return CB_ERR_ARG;
415
416 printk(BIOS_SPEW, "waiting for thread\n");
417
418 stopwatch_init(&sw);
419
420 while (handle->state != THREAD_DONE)
421 assert(thread_yield() == 0);
422
423 printk(BIOS_SPEW, "took %lld us\n", stopwatch_duration_usecs(&sw));
424
425 return handle->error;
426}
427
428void thread_mutex_lock(struct thread_mutex *mutex)
429{

Callers 4

mainboard_finalFunction · 0.85
get_preload_rdevFunction · 0.85
soc_update_apob_cacheFunction · 0.85

Calls 5

current_threadFunction · 0.85
stopwatch_initFunction · 0.85
stopwatch_duration_usecsFunction · 0.85
thread_yieldFunction · 0.70
printkFunction · 0.50

Tested by

no test coverage detected