Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pthread_mutex_init(3P)

pthread_mutex_lock(3P)

pthread_mutex_unlock(3P)

pthread_mutex_trylock(3P)

PTHREAD_MUTEX_DESTROY(3P)            BSD             PTHREAD_MUTEX_DESTROY(3P)



NAME
     pthread_mutex_destroy - Deletes a mutex

SYNOPSIS
     #include <pthread.h>

     int pthread_mutex_destroy (mutex)
     pthread_mutex_t *mutex;

DESCRIPTION
     The pthread_mutex_destroy function deletes the specified mutex, which
     allows the resources of the mutex to be reclaimed.

     The mutex argument specifies the address of the ID of the mutex to be
     deleted.

     Attempting to lock or unlock a mutex that has been deleted will result in
     undefined behavior.

NOTES
     This interface is based on draft 4 of the IEEE P1003.4a standard, and
     will be changed to conform to the final version.

DIAGNOSTICS
     Upon successful completion, the mutex argument is set to an illegal
     value, and a value of 0 (zero) is returned.  Otherwise, -1 is returned
     and errno is set to indicate the error.

ERRORS
     If the pthread_mutex_destroy function fails, errno may be set to one of
     the following values:

     [EBUSY]   The mutex is locked.

     [EINVAL]  The value specified by the mutex argument is invalid.

SEE ALSO
     pthread_mutex_init(3P), pthread_mutex_lock(3P), pthread_mutex_unlock(3P),
     pthread_mutex_trylock(3P)

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