Destroys the specified mutex.
#include <synch.h> int mutex_destroy ( mutex_t *mp );
(IN) Points to the mutex to destroy.
Returns 0. No error conditions have been implemented.
The mutex being destroyed must have been allocated by calling mutex_init. The mutex_destroy function does not release the memory for the mutex, but it does release the memory allocated with the mutex_init function.
You must free the memory for the mutex with the function that is paired with the function you used to allocate the memory. For example, if you used malloc to allocate the mutex, use free to release the memory.