thr_self(3THR) は、呼び出しスレッドの識別子を取得します (POSIX スレッドについては、pthread_self(3THR)を参照)。
#include <thread.h> thread_t thr_self(void);