2 .\" Copyright (c) 1998 Sun Microsystems, Inc. - All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH THR_MAIN 3C "May 11, 1998"
8 thr_main \- identify the main thread
12 cc -mt [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ]
15 \fBint\fR \fBthr_main\fR(\fBvoid\fR);
21 The \fBthr_main()\fR function returns one of the following:
28 if the calling thread is the main thread
37 if the calling thread is not the main thread
46 if \fBlibthread\fR is not linked in or thread initialization has not completed
53 \fB\fB/lib/libthread\fR \fR
62 See \fBattributes\fR(5) for descriptions of the following attributes:
70 ATTRIBUTE TYPE ATTRIBUTE VALUE
78 \fBthr_self\fR(3C), \fBattributes\fR(5)