Query: pthread_create
OS: redhat
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
PTHREAD_CREATE(3) Library Functions Manual PTHREAD_CREATE(3)NAMEpthread_create - create a new threadSYNOPSIS#include <pthread.h> int pthread_create(pthread_t * thread, pthread_attr_t * attr, void * (*start_routine)(void *), void * arg);DESCRIPTIONpthread_create creates a new thread of control that executes concurrently with the calling thread. The new thread applies the function start_routine passing it arg as first argument. The new thread terminates either explicitly, by calling pthread_exit(3), or implicitly, by returning from the start_routine function. The latter case is equivalent to calling pthread_exit(3) with the result returned by start_rou- tine as exit code. The attr argument specifies thread attributes to be applied to the new thread. See pthread_attr_init(3) for a complete list of thread attributes. The attr argument can also be NULL, in which case default attributes are used: the created thread is joinable (not detached) and has default (non real-time) scheduling policy.RETURN VALUEOn success, the identifier of the newly created thread is stored in the location pointed by the thread argument, and a 0 is returned. On error, a non-zero error code is returned.ERRORSEAGAIN not enough system resources to create a process for the new thread. EAGAIN more than PTHREAD_THREADS_MAX threads are already active.AUTHORXavier Leroy <Xavier.Leroy@inria.fr>SEE ALSOpthread_exit(3), pthread_join(3), pthread_detach(3), pthread_attr_init(3). LinuxThreads PTHREAD_CREATE(3)
Related Man Pages |
---|
iv_thread_set_debug_state(3) - debian |
iv_thread(3) - debian |
pthread_create(3t) - hpux |
pthread_create(3) - osx |
pthread_create(3) - freebsd |
Similar Topics in the Unix Linux Community |
---|
Posix Thread Programming |
How Can I use pthread_create ? |
FATAL:exception occured with pthread_exit() |
Pthread_create issue |
pthread_create |