Obtains the mutex type attribute in the specified mutex attribute object.
1 – C Binding
#include <pthread.h> int pthread_mutexattr_gettype ( const pthread_mutexattr_t *attr, int *type);
2 – Arguments
attr Mutex attributes object whose mutex type attribute is obtained. type Receives the value of the mutex type attribute. The type argument specifies the type of mutex that can be created. Valid values are: PTHREAD_MUTEX_NORMAL PTHREAD_MUTEX_DEFAULT (default) PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_ERRORCHECK
3 – Description
This routine obtains the value of the mutex type attribute in the mutex attributes object specified by the attr argument and stores it in the location specified by the type argument. See the pthread_mutexattr_settype() description for information about mutex types.
4 – Return Values
On successful completion, this routine returns the mutex type in the location specified by the type argument. If an error condition occurs, this routine returns an integer value indicating the type of the error. Possible return values are as follows: Return Description 0 Successful completion. [EINVAL] The value specified by attr is not a valid mutex attributes object.
5 – Associated Routines
pthread_mutexattr_init() pthread_mutexattr_settype() pthread_mutex_init()