aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/thr_new.2
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/sys/thr_new.2')
-rw-r--r--lib/libc/sys/thr_new.226
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/libc/sys/thr_new.2 b/lib/libc/sys/thr_new.2
index 44c468dec70c..189ca7512e89 100644
--- a/lib/libc/sys/thr_new.2
+++ b/lib/libc/sys/thr_new.2
@@ -52,7 +52,7 @@ The machine context for the new thread is copied from the creating thread's
context, including coprocessor state.
FPU state and specific machine registers are excluded from the copy.
These are set according to ABI requirements and syscall parameters.
-The FPU state for new thread is reinitialized to clean.
+The FPU state for the new thread is reinitialized to clean.
.Pp
The
.Fa param
@@ -77,22 +77,22 @@ struct thr_param {
and contains the following fields:
.Bl -tag -width ".Va parent_tid"
.It Va start_func
-The pointer to the thread entry function.
-Kernel arranges for the new thread to start executing the function
+Pointer to the thread entry function.
+The kernel arranges for the new thread to start executing the function
upon the first return to userspace.
.It Va arg
Opaque argument supplied to the entry function.
.It Va stack_base
Stack base address.
The stack must be allocated by the caller.
-On some architectures, the ABI might require that system put information
+On some architectures, the ABI might require that the system put information
on the stack to ensure the execution environment for
.Va start_func .
.It Va stack_size
Stack size.
.It Va tls_base
TLS base address.
-The value of TLS base is loaded to the ABI-defined machine register
+The value of TLS base is loaded into the ABI-defined machine register
in the new thread context.
.It Va tls_size
TLS size.
@@ -113,9 +113,9 @@ issuing the
syscall, while
.Va parent_tid
is used by the thread creator.
-The later is separate from the
+The latter is separate from
.Va child_tid
-because new thread might exit and free its thread data before parent
+because the new thread might exit and free its thread data before the parent
has a chance to execute far enough to access it.
.It Va flags
Thread creation flags.
@@ -132,7 +132,9 @@ The flag is not currently implemented.
.El
.It Va rtp
Real-time scheduling priority for the new thread.
-May be NULL if thread should inherit the priority from the
+May be
+.Dv NULL
+to inherit the priority from the
creating thread.
.El
.Pp
@@ -184,14 +186,16 @@ initial data on the stack.
.It Bq Er EINVAL
The
.Fa param_size
-argument specifies negative value, or its value is greater than the
+argument specifies a negative value, or the value is greater than the
largest
.Fa struct param
size the kernel can interpret.
.It Bq Er EINVAL
The
.Fa rtp
-member is not NULL, but specifies invalid scheduling parameters.
+member is not
+.Dv NULL
+and specifies invalid scheduling parameters.
.It Bq Er EINVAL
The specified TLS base is invalid.
.It Bq Er EPROCLIM
@@ -224,5 +228,5 @@ system call is non-standard and is used by the
.Lb libthr
to implement
.St -p1003.1-2001
-.Xr pthread(3)
+.Xr pthread 3
functionality.