summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/man/pthread_create.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/man/pthread_create.3')
-rw-r--r--lib/libpthread/man/pthread_create.322
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/libpthread/man/pthread_create.3 b/lib/libpthread/man/pthread_create.3
index 8bae34329dc..71eeb0ee11d 100644
--- a/lib/libpthread/man/pthread_create.3
+++ b/lib/libpthread/man/pthread_create.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pthread_create.3,v 1.8 2002/02/21 20:12:19 fgsch Exp $
+.\" $OpenBSD: pthread_create.3,v 1.9 2002/05/01 08:03:30 mpech Exp $
.\"
.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
.\" All rights reserved.
@@ -47,12 +47,13 @@ The
.Fn pthread_create
function is used to create a new thread, with attributes specified by
.Fa attr ,
-within a process. If
+within a process.
+If
.Fa attr
is NULL, the default attributes are used. If the attributes specified by
.Fa attr
-are modified later, the thread's attributes are not affected. Upon
-successful completion
+are modified later, the thread's attributes are not affected.
+Upon successful completion
.Fn pthread_create
will store the ID of the created thread in the location specified by
.Fa thread .
@@ -61,15 +62,18 @@ The thread is created executing
.Fa start_routine
with
.Fa arg
-as its sole argument. If the
+as its sole argument.
+If the
.Fa start_routine
returns, the effect is as if there was an implicit call to
.Fn pthread_exit
using the return value of
.Fa start_routine
-as the exit status. Note that the thread in which
+as the exit status.
+Note that the thread in which
.Fn main
-was originally invoked differs from this. When it returns from
+was originally invoked differs from this.
+When it returns from
.Fn main ,
the effect is as if there was an implicit call to
.Fn exit
@@ -87,8 +91,8 @@ The set of signals pending for the new thread is empty.
.Sh RETURN VALUES
If successful, the
.Fn pthread_create
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
+function will return zero.
+Otherwise an error number will be returned to indicate the error.
.Sh ERRORS
.Fn pthread_create
will fail if: