Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Threads Library Functionsthr_main(3THR)


NAME

 thr_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 TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

thr_self(3THR), attributes(5)


SunOS 5.9Go To TopLast Changed 11 May 1998

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.