PTHREAD(3)

NAME
pthread - POSIX Threads Library

LIBRARY
libpthread

SYNOPSIS
#include <pthread.h>

cc [flags] files -lpthread [libraries]

DESCRIPTION
The pthread library is an implementation of the standard POSIX threads library using the Scheduler Activations framework in the NetBSD kernel, providing a kernel-supported MxN scheduling system.

ENVIRONMENT
PTHREAD_CONCURRENCY
    The number of concurrent threads to be run. This value should at least be 1, and smaller than or equal to the number of CPUs.
PTHREAD_DIAGASSERT
    Possible values are any combinations of:
    A   Ignore errors.
    a   Abort on errors, creating a core dump for further debugging.
    E   Do not log errors to stdout.
    e   Log errors to stdout.
    L   Do not log errors via syslogd(8).
    l   Log errors via syslogd(8).
PTHREAD_DEBUGCOUNTERS
    Print pthread event counters before the program terminates.
PTHREAD_DEBUGLOG
    Write debugging information into shared memory. This debug log can be parsed and printed by the debuglog program found in src/lib/libpthread/debuglog.c.
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.
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 (limit for csh(1), or ulimit for sh(1)).

SEE ALSO
pthread_attr(3), pthread_barrier_destroy(3), pthread_barrier_init(3), pthread_barrier_wait(3), pthread_barrierattr(3), pthread_cancel(3), pthread_cleanup_push(3), pthread_cond_broadcast(3), pthread_cond_destroy(3), pthread_cond_init(3), pthread_cond_wait(3), pthread_condattr(3), pthread_create(3), pthread_detach(3), pthread_equal(3), pthread_exit(3), pthread_getspecific(3), pthread_join(3), pthread_key_create(3), pthread_key_delete(3), pthread_kill(3), pthread_mutex_destroy(3), pthread_mutex_init(3), pthread_mutex_lock(3), pthread_mutex_unlock(3), pthread_mutexattr(3), pthread_once(3), pthread_rwlock_destroy(3), pthread_rwlock_init(3), pthread_rwlock_rdlock(3), pthread_rwlock_unlock(3), pthread_rwlock_wrlock(3), pthread_rwlockattr(3), pthread_schedparam(3), pthread_self(3), pthread_setspecific(3), pthread_sigmask(3), pthread_spin_destroy(3), pthread_spin_init(3), pthread_spin_lock(3), pthread_spin_unlock(3), pthread_testcancel(3) Thomas E. Anderson, Brian N. Bershad, Edward D. Lazowska, Henry M. Levy, Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism, ACM Transactions on Computer Systems, Vol. 10, No. 1, February 1992, 53-79. Nathan J. Williams, An Implementation of Scheduler Activations on the NetBSD Operating System, Proceedings of the FREENIX Track: 2002 USENIX Annual Technical Conference (FREENIX '02), 2002, http://www.mit.edu/people/nathanw/usenix/.

STANDARDS
The pthread library conforms to p1003.1-2001.

AUTHORS
Nathan J. Williams <nathanw@NetBSD.org>