名称
pthread_cond_init -- 创建一个条件变量
提要
#include <pthread.h>
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
描述
The pthread_cond_init() 函数使用由attr指定的属性来创建一个条件变量,若attr为NULL,则属性取默认值。
返回值
If successful, the pthread_cond_init() function
will return zero and put the new condition
variable id into cond,
若成功执行,函数pthread_cond_init()将返回零,并把新建条件变量的id放在cond变量中,否则,将返回一个代表错误的错误码。
错误
函