pthread_mutex_init 2. Syntax 3. Param 4. Return Value 5. Remark 6. Example 7. Issue

Destroy a pthread_mutex_t object.

2. Syntax

1
#include <pthread.h>
1
2
int pthread_mutex_init(pthread_mutex_t *restrict            mutex,
const pthread_mutexattr_t *restrict attr);

3. Param

3.1 mutex

A pointer that point to a pthread_mutex_t object.

3.2 attr

A pointer that point to a pthread_mutexattr_t object.

4. Return Value

Upon successful, return zero; otherwise, an error number shall be returned to indicate the error.

5. Remark

6. Example

7. Issue