nightly: remove unused BINARCHIVE
[unleashed.git] / share / man / man3c / thr_main.3c
blobac6da4e0c26db3c288568226716d3889f547ee95
1 '\" te
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"
7 .SH NAME
8 thr_main \- identify the main thread
9 .SH SYNOPSIS
10 .LP
11 .nf
12 cc -mt [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ]
13 #include <thread.h>
15 \fBint\fR \fBthr_main\fR(\fBvoid\fR);
16 .fi
18 .SH DESCRIPTION
19 .sp
20 .LP
21 The  \fBthr_main()\fR function  returns one of the following:
22 .sp
23 .ne 2
24 .na
25 \fB\fB1\fR \fR
26 .ad
27 .RS 7n
28 if the calling thread is the main thread
29 .RE
31 .sp
32 .ne 2
33 .na
34 \fB\fB0\fR \fR
35 .ad
36 .RS 7n
37 if the calling thread is not the main thread
38 .RE
40 .sp
41 .ne 2
42 .na
43 \fB-\fB1\fR \fR
44 .ad
45 .RS 7n
46 if  \fBlibthread\fR is not linked in or thread initialization has not completed
47 .RE
49 .SH FILES
50 .sp
51 .ne 2
52 .na
53 \fB\fB/lib/libthread\fR \fR
54 .ad
55 .RS 19n
57 .RE
59 .SH ATTRIBUTES
60 .sp
61 .LP
62 See \fBattributes\fR(5) for descriptions of the following attributes:
63 .sp
65 .sp
66 .TS
67 box;
68 l | l
69 l | l .
70 ATTRIBUTE TYPE  ATTRIBUTE VALUE
72 MT-Level        MT-Safe
73 .TE
75 .SH SEE ALSO
76 .sp
77 .LP
78 \fBthr_self\fR(3C), \fBattributes\fR(5)