マルチスレッドのプログラミング

pthread_attr_getscope(3T)

pthread_attr_getscope(3T) は、スレッドのスコープを取得します。これはスレッドが結合するかしないかを示します。


プロトタイプ:

int	pthread_attr_getscope(pthread_attr_t *tattr, int *scope);

#include <pthread.h>

pthread_attr_t tattr;
int scope;
int ret;

/* スレッドのスコープを取得する */
ret = pthread_attr_getscope(&tattr, &scope);

戻り値

正常終了時は 0 です。それ以外の戻り値は、エラーが発生したことを示します。以下の条件が検出されると、この関数は失敗し、対応する値を返します。


EINVAL

scope の値が NULL か、tattr の値が無効です。