2c9b7b1eb7
with the shell's command to change limits. Make the PTHREAD_STACKSIZE environment variable override the default stack size. The old fixed stack size behaviour can be enable with PT_FIXEDSTACKSIZE_LG when building libpthread.
177 lines
5.0 KiB
Groff
177 lines
5.0 KiB
Groff
.\" $NetBSD: pthread.3,v 1.3 2003/11/27 16:30:54 cl Exp $
|
|
.\"
|
|
.\" Copyright (c) 2003 Hubert Feyrer <hubertf@NetBSD.org>
|
|
.\" and Thomas Klausner <wiz@NetBSD.org>
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. The name of the authors may not be used to endorse or promote products
|
|
.\" derived from this software without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
.\" IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.Dd November 27, 2003
|
|
.Dt PTHREAD 3
|
|
.Os
|
|
.Sh NAME
|
|
.Nm pthread
|
|
.Nd POSIX Threads Library
|
|
.Sh LIBRARY
|
|
.Lb libpthread
|
|
.Sh SYNOPSIS
|
|
.In pthread.h
|
|
.Pp
|
|
.Nm cc
|
|
.Op Ar flags
|
|
.Ar files
|
|
.Fl lpthread
|
|
.Op Ar libraries
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
library is an implementation of the standard
|
|
.Tn POSIX
|
|
threads library using the Scheduler Activations framework
|
|
in the
|
|
.Nx
|
|
kernel, providing a kernel-supported MxN scheduling system.
|
|
.Sh ENVIRONMENT
|
|
.Bl -tag -width PTHREAD_DEBUGCOUNTERSXX -compact
|
|
.It Ev PTHREAD_DIAGASSERT
|
|
Possible values are any combinations of:
|
|
.Bl -tag -width ignoreXX -offset indent -compact
|
|
.It Sy A
|
|
Ignore errors.
|
|
.It Sy a
|
|
Abort on errors, creating a core dump for further debugging.
|
|
.It Sy E
|
|
Do not log errors to stdout.
|
|
.It Sy e
|
|
Log errors to stdout.
|
|
.It Sy L
|
|
Do not log errors via
|
|
.Xr syslogd 8 .
|
|
.It Sy l
|
|
Log errors via
|
|
.Xr syslogd 8 .
|
|
.El
|
|
.It Ev PTHREAD_DEBUGCOUNTERS
|
|
Print pthread event counters before the program terminates.
|
|
.It Ev PTHREAD_DEBUGLOG
|
|
Write debugging information into shared memory.
|
|
This debug log can be parsed and printed by the
|
|
.Nm debuglog
|
|
program found in
|
|
.Pa src/lib/libpthread/debuglog.c .
|
|
.\" Following commented out since it will be removed shortly.
|
|
.\".It Ev PTHREAD_PREEMPT
|
|
.\"Generate upcalls on a vanilla
|
|
.\".Fn preempt .
|
|
.It Ev PTHREAD_RRTIME
|
|
Integer value giving the round-robin interval in ms.
|
|
The default is 100.
|
|
If set to 0, timer-based round-robin scheduling is disabled.
|
|
.It Ev PTHREAD_STACKSIZE
|
|
Integer value giving the stack size in kilobytes.
|
|
This allows to set a smaller stack size than the default stack size.
|
|
The default stack size is the current limit on the stack size as
|
|
set with the shell's command to change limits
|
|
.Ic ( limit
|
|
for
|
|
.Xr csh 1 ,
|
|
or
|
|
.Ic ulimit
|
|
for
|
|
.Xr sh 1 ) .
|
|
.El
|
|
.Sh SEE ALSO
|
|
.Xr pthread_attr 3 ,
|
|
.Xr pthread_barrier_destroy 3 ,
|
|
.Xr pthread_barrier_init 3 ,
|
|
.Xr pthread_barrier_wait 3 ,
|
|
.Xr pthread_barrierattr 3 ,
|
|
.Xr pthread_cancel 3 ,
|
|
.Xr pthread_cleanup_push 3 ,
|
|
.Xr pthread_cond_broadcast 3 ,
|
|
.Xr pthread_cond_destroy 3 ,
|
|
.Xr pthread_cond_init 3 ,
|
|
.Xr pthread_cond_wait 3 ,
|
|
.Xr pthread_condattr 3 ,
|
|
.Xr pthread_create 3 ,
|
|
.Xr pthread_detach 3 ,
|
|
.Xr pthread_equal 3 ,
|
|
.Xr pthread_exit 3 ,
|
|
.Xr pthread_getspecific 3 ,
|
|
.Xr pthread_join 3 ,
|
|
.Xr pthread_key_create 3 ,
|
|
.Xr pthread_key_delete 3 ,
|
|
.Xr pthread_kill 3 ,
|
|
.Xr pthread_mutex_destroy 3 ,
|
|
.Xr pthread_mutex_init 3 ,
|
|
.Xr pthread_mutex_lock 3 ,
|
|
.Xr pthread_mutex_unlock 3 ,
|
|
.Xr pthread_mutexattr 3 ,
|
|
.Xr pthread_once 3 ,
|
|
.Xr pthread_rwlock_destroy 3 ,
|
|
.Xr pthread_rwlock_init 3 ,
|
|
.Xr pthread_rwlock_rdlock 3 ,
|
|
.Xr pthread_rwlock_unlock 3 ,
|
|
.Xr pthread_rwlock_wrlock 3 ,
|
|
.Xr pthread_rwlockattr 3 ,
|
|
.Xr pthread_schedparam 3 ,
|
|
.Xr pthread_self 3 ,
|
|
.Xr pthread_setspecific 3 ,
|
|
.Xr pthread_sigmask 3 ,
|
|
.Xr pthread_spin_destroy 3 ,
|
|
.Xr pthread_spin_init 3 ,
|
|
.Xr pthread_spin_lock 3 ,
|
|
.Xr pthread_spin_unlock 3 ,
|
|
.Xr pthread_testcancel 3
|
|
.Rs
|
|
.%A Thomas E. Anderson
|
|
.%A Brian N. Bershad
|
|
.%A Edward D. Lazowska
|
|
.%A Henry M. Levy
|
|
.%T "Scheduler Activations: Effective Kernel Support for the \
|
|
User-Level Management of Parallelism"
|
|
.%J ACM Transactions on Computer Systems
|
|
.%V Vol. 10
|
|
.%N No. 1
|
|
.%D February 1992
|
|
.%P 53-79
|
|
.Re
|
|
.Rs
|
|
.%A Nathan J. Williams
|
|
.%T "An Implementation of Scheduler Activations on the NetBSD \
|
|
Operating System"
|
|
.%J "Proceedings of the FREENIX Track: 2002 USENIX Annual Technical \
|
|
Conference (FREENIX '02)"
|
|
.%D 2002
|
|
.%O http://www.mit.edu/people/nathanw/usenix/
|
|
.Re
|
|
.Sh STANDARDS
|
|
The
|
|
.Nm
|
|
library conforms to
|
|
.St -p1003.1-2001 .
|
|
.Sh AUTHORS
|
|
.An Nathan J. Williams
|
|
.Aq nathanw@NetBSD.org
|