pthread_create man page on IRIX

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



pthread_create(3P)					    pthread_create(3P)

NAME
     pthread_create - create and start a thread

C SYNOPSIS
     #include <pthread.h>

     int pthread_create(pthread_t *thread, pthread_attr_t *attr,
	  void *(*start)(void *), void *arg);

DESCRIPTION
     The pthread_create() function creates a thread with the attributes
     specified by attr, starting execution at the function named start with
     the argument value arg.  A null value of attr causes the thread to be
     created with default attributes.  The thread identity is saved in the
     location pointed to by the thread argument.

     A new thread inherits its per-thread signal mask from its creator.	 No
     signals are pending on the thread when it starts.	The thread runs until
     it returns from its start function, calls pthread_exit(), or acts on a
     cancellation request.  The exception is the initial thread which will
     cause the process to exit if it returns from main().  When the process
     terminates so do all its threads.

     For an overview of POSIX threads see pthreads(5).

DIAGNOSTICS
     On success, pthread_create() returns zero; otherwise an error number is
     returned:

     [EAGAIN]	    The maximum number of threads has been created [see NOTES,
		    and setrlimit()] or there is insufficient memory to create
		    the thread.

     [EPERM]	    The calling process lacks sufficient privilege to create a
		    thread with these attributes [see
		    pthread_attr_setscope()].

     [EPERM]	    A call to pthread_create() was attempted from a sproc
		    program (see CAVEATS, section below).

     [EPERM]	    A call to pthread_create() was attempted with a priority
		    that is outside of the valid range (see CAVEATS, section
		    below).

     [ENOSYS]	    A call to pthread_create() was made from an executable
		    which is not linked against the POSIX threads library.
		    This typically occurs when the argument "-lpthread" is
		    accidentally omitted during compilation of the executable.

									Page 1

pthread_create(3P)					    pthread_create(3P)

NOTES
     A thread application can find the thread limit using the sysconf()
     function with the _SC_THREAD_THREADS_MAX option.

CAVEATS
     The POSIX thread model is incompatible with the sproc(2) model of
     threading.	 Attempts to create a pthread process from a sproc program
     will be rejected.

     Attempts to create a pthread process at a priority outside of the valid
     range will be rejected.  Specifically, weightless is not a valid pthread
     priority.

     For more information about these and other limitations with the POSIX
     thread model see pthreads(5).

SEE ALSO
     pthread_attr_init(3P), pthread_attr_setscope(3P), pthread_exit(3P),
     pthreads(5), setrlimit(2), sysconf(3C).

									Page 2

[top]

List of man pages available for IRIX

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