pthread_mutexattr_gettype(3C) は、pthread_mutexattr_settype() によって設定された mutex の型 (type) 属性を取得します。
#include <pthread.h> int pthread_mutexattr_gettype(pthread_mutexattr_t *restrict attr , int *restrict type);
型 (type) 属性のデフォルト値は PTHREAD_MUTEX_DEFAULT です。
型 (type) 引数は mutex の型を指定します。有効な mutex 型を以下に示します。
PTHREAD_MUTEX_NORMAL
PTHREAD_MUTEX_ERRORCHECK
PTHREAD_MUTEX_RECURSIVE
PTHREAD_MUTEX_DEFAULT
それぞれの型については、「pthread_mutexattr_settype の構文」を参照してください。
pthread_mutexattr_gettype() は、正常終了時に 0 を返します。それ以外の戻り値は、エラーが発生したことを示します。
EINVAL
説明:type で指定された値が無効です。