cnd_init

来自cppreference.com
< c‎ | thread
在标头 <threads.h> 定义
int cnd_init(cnd_t* cond );
(C11 起)

初始化新的条件变量。设置 cond 所指的对象为标识该条件变量的值。

目录

[编辑]参数

cond - 指针,指向要存储条件变量标识符到的对象

[编辑]返回值

若成功创建条件变量则为 thrd_success。否则若内存量不足则返回 thrd_nomem,若出现其他错误则返回 thrd_error

[编辑]引用

  • C17 标准(ISO/IEC 9899:2018):
  • 7.26.3.3 The cnd_init function (第 276 页)
  • C11 标准(ISO/IEC 9899:2011):
  • 7.26.3.3 The cnd_init function (第 379 页)

[编辑]参阅

condition_variable 的 C++ 文档
condition_variable_any 的 C++ 文档
close