thrd_success, thrd_timedout, thrd_busy, thrd_nomem, thrd_error

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

    thrd_success = /* unspecified */,
    thrd_nomem = /* unspecified */,
    thrd_timedout = /* unspecified */,
    thrd_busy = /* unspecified */,
    thrd_error = /* unspecified */

};
(C11 起)

鉴别线程状态和错误。

常量 解释
thrd_success 指示成功的返回值
thrd_timedout 指示时间用尽的返回值
thrd_busy 指示因资源暂时不可用而不成功的返回值
thrd_nomem 指示因内存耗尽而不成功的返回值
thrd_error 指示不成功的返回值

引用

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