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

Function thread_mutex_lock

src/lib/thread.c:428–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428void thread_mutex_lock(struct thread_mutex *mutex)
429{
430 struct stopwatch sw;
431
432 stopwatch_init(&sw);
433
434 while (mutex->locked)
435 assert(thread_yield() == 0);
436 mutex->locked = true;
437
438 printk(BIOS_SPEW, "took %lld us to acquire mutex\n", stopwatch_duration_usecs(&sw));
439}
440
441void thread_mutex_unlock(struct thread_mutex *mutex)
442{

Callers 7

display_init_threadFunction · 0.50
mainboard_initFunction · 0.50
nor_readFunction · 0.50
mtk_i2c_transferFunction · 0.50
xfer_vectorsFunction · 0.50
spi_dma_readat_dmaFunction · 0.50

Calls 4

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

Tested by

no test coverage detected