HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)
p
pthread(3T) pthread(3T)
(Pthread Library)
Async-Cancel Safe
A function that may be called by a thread with the cancelability state set to
PTHREAD_CANCEL_ENABLE
and the cancelability type set to
PTHREAD_CANCEL_ASYNCHRONOUS
. If a thread is canceled in one of
these functions, no state is left in the function. These functions generally do not acquire resources to per-
form the function’s task.
Async-Signal Safe
An async-signal safe function is a function that may be called by a signal handler. Only a restricted set of
functions may safely be called by a signal handler. These functions are listed in section 3.3.1.3 of the
POSIX.1c standard.
Asynchronous Signal
An asynchronous signal is a signal that has been generated due to an external event. Signals sent by
kill() and signals generated due to timer expiration or asynchronous I/O completion are all examples of
asynchronously generated signals. Asynchronous signals are delivered to the process. All signals can be
generated asynchronously.
Atfork Handler
Application-provided and registered functions that are called before and after a
fork() operation. These
functions generally acquire all mutex locks before the
fork() and release these mutex locks in both the
parent and child processes after the fork().
Atomic Operation
An operation or sequence of events that is guaranteed to complete as if it were one instruction.
Barrier
A synchronization primitive that causes a certain number of threads to wait or rendezvous at specified
points in an application. Barriers are used when a application needs to ensure that all threads have com-
pleted some operation before proceeding onto the next task.
Bound Thread
A user thread that is directly bound to a kernel-scheduled entity. These threads contain a system schedul-
ing scope and are scheduled directly by the kernel.
Cache Thrashing
Cache thrashing is a situation in which a thread executes on different processors, causing cached data to be
moved to and from the different processor caches. Cache thrashing can cause severe performance degrada-
tion.
Cancellation Cleanup Handler
An application-provided and registered function that is called when a thread is canceled. These functions
generally perform thread cleanup actions during thread cancellation. These handlers are similar to signal
handlers.
Condition Variable
A condition variable is a synchronization primitive used to allow a thread to wait for an event. Condition
variables are often used in producer-consumer problems where a producer must provide something to one
or more consumers.
Context Switch
The act of removing the currently running thread from the processor and running another thread. A con-
text switch saves the register state of the currently running thread and restores the register state of the
thread chosen to execute next.
Critical Section
A section of code that must complete atomically and uninterrupted. A critical section of code is generally
one in which some global resource (variables, data structures, linked lists, etc.) is modified. The operation
being performed must complete atomically so that other threads do not see the critical section in an incon-
sistent state.
156 Hewlett-Packard Company − 8 − HP-UX 11i Version 3: February 2007