Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pthread_mutex_unlock(3) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pthread_mutexattr_setkind_np(3)

pthread_mutex_destroy(3)

pthread_mutex_init(3)

pthread_mutex_lock(3)

pthread_mutex_trylock(3)

pthread_unlock_global_np(3)

pthread_mutex_unlock(3)

NAME

pthread_mutex_unlock - Unlocks a mutex

SYNOPSIS

#include <pthread.h> int pthread_mutex_unlock( pthread_mutex_t *mutex);

PARAMETERS

mutexMutex that is unlocked. 

DESCRIPTION

The pthread_mutex_unlock() 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 pthread_mutex_lock(). The scheduling policy is used to determine which thread acquires the mutex. For the SCHED_FIFO and  SCHED_RR 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:

Return Error Description
0 Successful completion.
\-1 [EINVAL] The value specified by mutex is invalid.

RELATED INFORMATION

Functions:  pthread_mutexattr_setkind_np(3), pthread_mutex_destroy(3), pthread_mutex_init(3), pthread_mutex_lock(3), pthread_mutex_trylock(3), pthread_unlock_global_np(3). 

Hewlett-Packard Company  —  OSF DCE 1.1/HP DCE 1.5

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026