pthread_mutex_unlock(3-thr) pthread_mutex_unlock(3-thr)
NAME
pthreadmutexunlock - unlocks a mutex
SYNOPSIS
#include <pthread.h>
int pthreadmutexunlock(pthreadmutext *mutex);
PARAMETERS
mutex Mutex that is unlocked.
DESCRIPTION
The pthreadmutexunlock() routine unlocks a mutex. If no threads are
waiting for the mutex, the mutex unlocks with no current owner. If one
or more threads are waiting to lock the specified mutex, this routine
causes one thread to return from its call to pthreadmutexlock(). The
scheduling policy is used to determine which thread acquires the
mutex. For the SCHEDFIFO and SCHEDRR policies, a blocked thread is
chosen in priority order.
The results of calling this routine are unpredictable if the mutex
specified in mutex is unlocked. The results of calling this routine
are also unpredictable if the mutex specified in mutex is currently
owned by a thread other than the calling thread.
RETURN VALUES
If the function fails, errno may be set to one of the following
values:
EINVAL The value specified by mutex is invalid.
SEE ALSO
pthreadmutexdestroy(3-thr), pthreadmutexinit(3-thr),
pthreadmutexlock(3-thr), pthreadmutextrylock(3-thr),
pthreadunlockglobalnp(3-thr), pthreadmutexattrsetkindnp(3-thr).
Page 1 Reliant UNIX 5.44 Printed 11/98