Multithreaded Programming Guide

Destroy a Mutex

Use mutex_destroy(3C) to destroy any state that is associated with the mutex pointed to by mp . The space for storing the mutex is not freed. For POSIX threads, see pthread_mutex_destroy Syntax.

mutex_destroy Syntax

#include <thread.h>

int mutex_destroy (mutex_t *mp);

mutex_destroy Return Values

mutex_destroy() returns 0 if successful. When the following condition is detected, mutex_destroy() fails and returns the corresponding value.



mp points to an illegal address.