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

条件変数の属性の削除

記憶領域を削除し、属性オブジェクトを無効にするには、pthread_condattr_destroy(3C) を使用します。

pthread_condattr_destroy の構文

int pthread_condattr_destroy(pthread_condattr_t *cattr);
#include <pthread.h>
pthread_condattr_t cattr;
int ret;

/* destroy an attribute */
ret
 = pthread_condattr_destroy(&cattr); 

pthread_condattr_destroy の戻り値

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


EINVAL

説明:

cattr で指定された値が無効です。