thr_main(3T) manual page
Table of Contents
thr_main - identify the main thread
cc [ flag ... ] file ... -lthread
[ library ... ]
#include <thread.h>
int thr_main(void)
MT-Safe
thr_main() returns:
- 1 if the calling thread is the main thread.
- 0 if the
calling thread is not the main thread.
- -1 if libthread is not linked in
or thread initialization has not completed.
/lib/libthread
thr_self(3T)
Table of Contents