#include <thread.h> int mutex_lock(mutex_t *mp);
Use mutex_lock() to lock the mutex pointed to by mp. When the mutex is already locked, the calling thread blocks until the mutex becomes available (blocked threads wait on a prioritized queue).