Attention is currently required from: Raul Rangel, Eric Peers, Felix Held. Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56230 )
Change subject: lib/thread: Add mutex ......................................................................
Patch Set 7:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/56230/comment/bdc743e9_532947dc PS7, Line 14: : If a task (A) wishes to yield control to the next task (B) that is : holding onto the mutex, without encountering a delay of its own : (i.e., udelay(0)), then we need to ensure the next task (B) is at the : head of the queue. We do this by using a `0 us` delay in mutex_lock. If : we were to use anything larger than a `0 us` delay, a `udelay(0)` by the : task (A) that just unlocked the mutex will most likely not schedule the : next task (B) that was holding onto the mutex. Maybe its just me. But I find this example really confusing. The logic in the code makes sense, but this explanation confused me :P.