多线程编程指南

获取线程标识符

使用 thr_self(3C) 可以获取调用线程的 ID。对于 POSIX 线程,请参见pthread_self 语法

thr_self 语法

#include <thread.h>



thread_t thr_self(void);

thr_self 返回值

未定义任何错误。