Home | History | Annotate | Line # | Download | only in libpthread
pthread.3 revision 1.10
 $NetBSD: pthread.3,v 1.10 2009/04/11 16:51:28 wiz Exp $

Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
All rights reserved.

This code is derived from software contributed to The NetBSD Foundation
by Hubert Feyrer <hubertf (at] NetBSD.org> and Thomas Klausner <wiz (at] NetBSD.org>.

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.

THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
``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 FOUNDATION OR CONTRIBUTORS
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 October 8, 2008 .Dt PTHREAD 3 .Os .Sh NAME .Nm pthread .Nd POSIX Threads Library .Sh LIBRARY .Lb libpthread .Sh SYNOPSIS n pthread.h

p .Nm cc .Op Ar flags .Ar files .Fl lpthread .Op Ar libraries .Sh DESCRIPTION The .Nm library provides an implementation of the standard .Tn POSIX threads framework.

p Note that the system private thread interfaces upon which the .Nm library is built are subject to change without notice. In order to remain compatible with future .Nx releases, programs must be linked against the dynamic version of the thread library. Statically linked programs using the .Tn POSIX threads framework may not work when run on a future version of the system. .Sh ENVIRONMENT l -tag -width PTHREAD_DEBUGCOUNTERSXX t Ev PTHREAD_CONCURRENCY The current version of the system does not inspect this variable. It is reserved for use by the .Nm library. t Ev PTHREAD_DIAGASSERT Possible values are any combinations of:

p l -tag -width ignoreXX -offset indent -compact t Sy A Report errors to application by error return, but do not abort. t Sy a Abort on errors, creating a core dump for further debugging. t Sy E Do not log errors to stdout. t Sy e Log errors to stdout. t Sy L Do not log errors via .Xr syslogd 8 . t Sy l Log errors via .Xr syslogd 8 . .El

p If not set in the environment, the .Nm library behaves as if .Sy AEL has been specified. t Ev PTHREAD_RRTIME The current version of the system does not inspect this variable. It is reserved for use by the .Nm library. t 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 c ( limit for .Xr csh 1 , or c 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 .Sh STANDARDS The .Nm library conforms to .St -p1003.1-2001 .