pthread_unlock_global_np(3) — Subroutines
NAME
pthread_unlock_global_np − Unlocks a global mutex.
SYNOPSIS
#include <pthread.h>
void pthread_unlock_global_np( );
PARAMETERS
None.
DESCRIPTION
This routine unlocks the global mutex when each call to pthread_lock_global_np has been matched by a call to this routine. For example, if you called pthread_lock_global_np three times, pthread_unlock_global_np unlocks the global mutex when you call it the third time. If no threads are waiting for the global mutex, it becomes unlocked with no current owner. If one or more threads are waiting to lock the global mutex, one thread returns from its call to pthread_lock_global_np. The scheduling policy is used to determine which thread acquires the global mutex. For the policies SCHED_FIFO, SCHED_RR, and SCHED_OTHER, a blocked thread is chosen in priority order, using SCHED_FIFO within priorities.
The results of calling this routine are unpredictable if the global mutex is already unlocked. The results of calling this routine are also unpredictable if the global mutex is owned by a thread other than the calling thread.
Do not call this routine from any software interrupt handler.
RETURN VALUES
None.
RELATED INFORMATION
pthread_lock_global_np(3), pthread_mutexattr_setkind_np(3), pthread_mutex_lock(3), pthread_mutex_unlock(3)