名稱空間
變體
操作

mtx_plain, mtx_recursive, mtx_timed

來自 cppreference.com
< 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 (p: 274-275)
  • C11 標準 (ISO/IEC 9899:2011)
  • 7.26.1/5 mtx_plain, mtx_recursive, mtx_timed (p: 377)

[編輯] 另請參閱

建立互斥體
(函式) [編輯]