thr_main man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]



thr_main(3scl)							thr_main(3scl)

NAME
       thr_main - Identifies if this is the main thread.

LIBRARY
       SCL Threads Library (libthread.so)

SYNOPSIS
       #include <thread.h>

       int thr_main( void );

PARAMETERS
       None.

DESCRIPTION
       This routine returns 1 if the calling thread is the main thread.

       The  main  thread is the first thread of a process. In a C program, the
       main thread is the thread which first executes main().

SCL IMPLEMENTATION NOTES
       POSIX threads has no equivalent to thr_main(3scl). Thus the SCL	thread
       library	stores	information  about  the	 main  thread  when the thread
       library initializes, and uses this information to subsequently identify
       the main thread.

       Note  that  Solaris  documents that thr_main(3scl) can return -1 if the
       thread library has not been linked in, or it has not initialized.  This
       return value is not possible from SCL.

RETURN VALUES
       Possible	 return	 values	 are as follows: The calling thread is not the
       main thread.  The calling thread is the main thread.

ERRORS
       None.

RELATED INFORMATION
       Functions: scl_intro(3scl), scl_thread_intro(3scl)

       Manuals: Solaris Compatibility Libraries User's Guide

								thr_main(3scl)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net