Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
pthread_mutex_destroy()
Destroy a mutex
Synopsis:
#include <pthread.h> int pthread_mutex_destroy( pthread_mutex_t* mutex );
Arguments:
- mutex
- A pointer to the pthread_mutex_t object that you want to destroy.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The pthread_mutex_destroy() function destroys the unlocked mutex mutex.
You can only destroy a locked mutex provided you're the owner of that mutex.
![]() |
Once you've destroyed a mutex, don't reuse it without reinitializing it by calling pthread_mutex_init(). |
Returns:
- EOK
- Success.
- EBUSY
- The mutex is locked by another thread.
- EINVAL
- Invalid mutex mutex.
Classification:
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
See also:
pthread_mutex_init(), SyncDestroy(), SyncMutexRevive()
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
