thrd_success, thrd_timedout, thrd_busy, thrd_nomem, thrd_error

来自cppreference.com
< c‎ | thread
在标头 <threads.h> 定义
enum {

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

};
(C11 起)

鉴别线程状态和错误。

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

引用

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