Deletes a mutex.
pthread_mutex_destroy(
                      mutex );
 
Argument         Data Type               Access
mutex            opaque pthread_mutex_t  read
int pthread_mutex_destroy ( pthread_mutex_t *mutex);
It is illegal to delete a locked mutex.
The results of this routine are unpredictable if the mutex object specified in the mutex argument does not currently exist.
Return Error Description0 Successful completion. -1 [EBUSY] An attempt is made to destroy a locked mutex. -1 [EINVAL] The value specified by mutex is invalid.