命名空间
变体
操作

thrd_success、thrd_timedout、thrd_busy、thrd_nomem、thrd_error

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

    thrd_success = /* 未指定 */,
    thrd_nomem = /* 未指定 */,
    thrd_timedout = /* 未指定 */,
    thrd_busy = /* 未指定 */,
    thrd_error = /* 未指定 */

};
(C11 起)

线程状态和错误的标识符。

常量 解释
thrd_success 指示成功的返回值
thrd_nomem 指示由于内存不足条件而导致的不成功的返回值
thrd_timedout 指示超时的返回值
thrd_busy 指示由于资源暂时不可用而导致的不成功的返回值
thrd_error 指示不成功的返回值

[编辑] 参考

  • C17 标准 (ISO/IEC 9899:2018)
  • 7.26.1/5 thrd_success, thrd_timedout, ... (p: 275)
  • C11 标准 (ISO/IEC 9899:2011)
  • 7.26.1/5 thrd_success, thrd_timedout, ... (p: 377)