PTHREAD_MUTEXATTR_GETKIND_NP(3) | FreeBSD Library Functions Manual | PTHREAD_MUTEXATTR_GETKIND_NP(3) |
名称
pthread_mutexattr_getkind_np, pthread_mutexattr_setkind_np — ミューテックス属性操作 (遺産)ライブラリ
POSIX Threads Library (libpthread, -lpthread)書式
#include < pthread_np.h> int
pthread_mutexattr_getkind_np( pthread_mutexattr_t attr);
int
pthread_mutexattr_setkind_np( pthread_mutexattr_t *attr, int kind);
解説
これらの関数は、ミューテックスタイプ操作の後方互換で移植性のない実装です。
pthread_mutexattr_gettype(3) および pthread_mutexattr_settype(3) 関数を代わりに使用することを推奨します。
戻り値
pthread_mutexattr_getkind_np() 関数は、成功すれば、ミューテックス属性 attr の“kind” (種類) を表す正の値を返します。そうでない場合、値-1 が返され、グローバル変数 errno にエラーを示す値が設定されます。
The pthread_mutexattr_setkind_np() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.
エラー
pthread_mutexattr_getkind_np() と pthread_mutexattr_setkind_np() 関数は、次の場合に失敗します:- [ EINVAL]
- attr で指定される値が、無効です。
関連項目
pthread_mutexattr_gettype(3), pthread_mutexattr_settype(3), pthread_mutex_destroy(3), pthread_mutex_init(3)February 13, 2003 | FreeBSD |