Open System Services Programmer's Guide
_PUT_SELECT_SINGLE_
This define maps select() to a variant of select() that checks the status of a single file
descriptor using a faster algorithm. (This is equivalent to SPT_SELECT_SINGLE in the SPT library.)
Environment Variables
PUT_THREAD_AWARE_REGULAR_IO_DISABLE
Allows you to disable the thread aware regular file I/O behavior. For more information about
thread-aware regular file I/O behavior, see “Thread-Aware and Nonblocking OSS Functions”
(page 396).
PUT_PROTECTED_STACK_DISABLE
Allows you to disable protected stack support. When you disable protected stack support, the
heap allocation method is used to create the thread stack. For more information about protected
stacks, see “The Protected Thread Stack for Signals” (page 387).
Standards Conformance
The POSIX threads standard is officially described in Institute of Electrical and Electronics Engineers,
Inc., 2004 IEEE Std 1003.1-2001, IEEE Std 1003.1-2001/Cor 1-2002 and IEEE Std
1003.1-2001/Cor 2-2004. For simplicity, this manual refers to the “Standard document.” The
Standard document is available for purchase online at http://standards.ieee.org/.
Portable pthreads functions provided by the PUT Model library (designated with either the pthread_
or PTHREAD_ prefix and without the _np or _NP suffix) comply with the IEEE Std 1003.1, 2004,
POSIX System Application Program Interface.
In contrast to the SPT library, the PUT Model library does not provide these global variables because
these global variables are not specified in the final standard:
pthread_attr_default
pthread_mutexattr_default
pthread_condattr_default
Error Reporting Changed From Draft 4 Standard
The PUT Model library functions return error indications as return values, instead of setting errno.
The error values returned are in many cases the values that were stored in errno in Draft 4. The
PUT Model library supports only the error values described in the Standard document.
If an error condition occurs, a pthread routine returns an integer value indicating the type of error.
For example, a call to the Draft 4 implementation of pthread_cond_destroy() that returned
a -1 and set errno to EBUSY now returns EBUSY as the routine return value.
Reporting errors by returning error values is a global change from the previous standard (Draft 4),
in which errors are reported in errno. If you are porting a threaded application that adheres to
Draft 4, you must rewrite the error handling routines. The “Threaded Application Examples”
(page 432) demonstrates error handling with the PUT Model library. See the Open System Services
Porting Guide for a list of the supported return values as well as other porting issues.
Exceptions and Extensions to the Standard Document
Although the PUT Model library version of sigaction() accepts the SA_ONSTACK flag, the
PUT Model library determines which stack is used to run the thread signal handler. The PUT Model
library does not allow you to establish a signal stack using the sigaltstack() function. For
more information about this behavior, see “The Protected Thread Stack for Signals” (page 387).
These functions are not async-signal safe, so they should not be used in signal handlers:
alarm()
fork()
pause()
Standards Conformance 381