THR_MAIN(3C)THR_MAIN(3C)NAMEthr_main - identify the main thread
SYNOPSIS
cc -mt [ flag... ] file... [ library... ]
#include <thread.h>
int thr_main(void);
DESCRIPTION
The thr_main() function returns one of the following:
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
FILES
/lib/libthread
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
┌───────────────┬─────────────────┐
│ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
├───────────────┼─────────────────┤
│MT-Level │ MT-Safe │
└───────────────┴─────────────────┘
SEE ALSOthr_self(3C), attributes(5)
May 11, 1998 THR_MAIN(3C)