![]() |
![]() |
![]() |
Unlock mutex
#include <pthread.h> int pthread_mutex_unlock( pthread_mutex_t* mutex );
libc
The pthread_mutex_unlock() function unlocks the mutex mutex. The mutex should be owned by the calling thread. If there are threads blocked on the mutex then the highest priority waiting thread is unblocked and becomes the next owner of the mutex.
If mutex has been locked more than once, it must be unlocked the same number of times before the next thread is given ownership of the mutex. This only works for recursive mutexes.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
pthread_mutex_lock(), pthread_mutex_trylock(), SyncMutexUnlock()
![]() |
![]() |
![]() |