Manpage of PTHREAD_CREATE
Section: C Library Functions (3)
Return to Main Contents
pthread_create - create a new thread
int pthread_create(pthread_t * thread, pthread_attr_t * attr, void * (*start_routine)(void *), void * arg);
creates a new thread of control that executes
concurrently with the calling thread. The new thread applies the
as first argument. The new
thread terminates either explicitly, by calling
or implicitly, by returning from the
latter case is equivalent to calling
with the result
as exit code.
argument specifies thread attributes to be applied to the
new thread. See
for a complete list of thread
argument can also be
in which case
default attributes are used: the created thread is joinable (not
detached) and has default (non real-time) scheduling policy.
On success, the identifier of the newly created thread is stored in
the location pointed by the
argument, and a 0 is returned. On
error, a non-zero error code is returned.
not enough system resources to create a process for the new thread.
threads are already active.
Xavier Leroy <Xavier.Leroy@inria.fr>
- RETURN VALUE
- SEE ALSO
This document was created by
using the manual pages.
Time: 14:06:05 GMT, November 15, 2001