'\" te .\" Copyright (c) 1998 Sun Microsystems, Inc. - All Rights Reserved. .TH thr_main 3C "11 May 1998" "SunOS 5.11" "Standard C Library Functions" .SH NAME thr_main \- identify the main thread .SH SYNOPSIS .LP .nf cc -mt [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ] #include \fBint\fR \fBthr_main\fR(\fBvoid\fR); .fi .SH DESCRIPTION .sp .LP The \fBthr_main()\fR function returns one of the following: .sp .ne 2 .mk .na \fB\fB1\fR \fR .ad .RS 7n .rt if the calling thread is the main thread .RE .sp .ne 2 .mk .na \fB\fB0\fR \fR .ad .RS 7n .rt if the calling thread is not the main thread .RE .sp .ne 2 .mk .na \fB-\fB1\fR \fR .ad .RS 7n .rt if \fBlibthread\fR is not linked in or thread initialization has not completed .RE .SH FILES .sp .ne 2 .mk .na \fB\fB/lib/libthread\fR \fR .ad .RS 19n .rt .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; lw(2.75i) |lw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBthr_self\fR(3C), \fBattributes\fR(5)