VMS Help
POSIX Threads, PTHREAD routines, pthread_mutex_destroy
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
Destroys a mutex.
#include <pthread.h>
int
pthread_mutex_destroy (
pthread_mutex_t *mutex);
mutex
The mutex to be destroyed.
This routine destroys the specified mutex by uninitializing it,
and should be called when a mutex object is no longer referenced.
After this routine is called, the Threads Library may reclaim
internal storage used by the specified mutex.
It is safe to destroy an initialized mutex that is unlocked.
However, it is illegal to destroy a locked mutex.
The results of this routine are unpredictable if the mutex object
specified in the mutex argument does not currently exist, or is
not initialized.
If an error condition occurs, this routine returns an integer
value indicating the type of error. Possible return values are as
follows:
Return Description
0 Successful completion.
[EBUSY] An attempt was made to destroy the object referenced
by mutex while it is locked.
[EINVAL] The value specified by mutex is not a valid mutex.
pthread_mutex_init()
pthread_mutex_lock()
pthread_mutex_trylock()
pthread_mutex_unlock()
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.