命名空间
变体
操作

mtx_plain, mtx_recursive, mtx_timed

来自 cppreference.cn
< c‎ | thread
定义于头文件 <threads.h>
enum {

    mtx_plain = /* unspecified */,
    mtx_recursive = /* unspecified */,
    mtx_timed = /* unspecified */

};
(自 C11 起)

当传递给 mtx_init 时,标识要创建的互斥锁类型。

常量 解释
mtx_plain 普通互斥锁
mtx_recursive 递归互斥锁
mtx_timed 定时互斥锁

[编辑] 参考

  • C17 标准 (ISO/IEC 9899:2018)
  • 7.26.1/5 mtx_plain, mtx_recursive, mtx_timed (页: 274-275)
  • C11 标准 (ISO/IEC 9899:2011)
  • 7.26.1/5 mtx_plain, mtx_recursive, mtx_timed (页: 377)

[编辑] 参见

创建互斥锁
(函数) [编辑]