Here, the mutex object referenced by mutex is locked by calling pthread_mutex_lock(). If the mutex is already locked, the calling thread blocks until the mutex becomes available. This operation returns with the mutex object referenced by mutex in the locked state with the calling thread as its owner. If a thread is blocked, the OS can schedule some other thread onto the execution context of this thread until the lock becomes available.
Here, the mutex object referenced by mutex is locked by calling
pthread_mutex_lock()
. If the mutex is already locked, the calling thread blocks until the mutex becomes available. This operation returns with the mutex object referenced by mutex in the locked state with the calling thread as its owner. If a thread is blocked, the OS can schedule some other thread onto the execution context of this thread until the lock becomes available.http://code.metager.de/source/xref/gnu/glibc/nptl/pthread_mutex_lock.c