Open System Services Programmer's Guide

Defining Nonblocking Thread-Aware Functions for Non-Regular Files
The spt_*x() set of nonblocking thread-aware functions for non-regular files are available on
systems running J-series RVUs, H06.05 and later H-series RVUs, and G06.28 and later G-series
RVUs.
For C applications, a macro to map interface() to spt_interfacex() is available when
you use the #define SPT_THREAD_AWARE_NONBLOCK preprocessor directive before including
spthread.h or when you use an equivalent compiler command option to compile the application.
For C++ applications, an alias to map interface() to spt_interfacex() is available when
you use the #define SPT_THREAD_AWARE_PRAGMA_NONBLOCK preprocessor directive before
including spthread.h or when you use an equivalent compiler command option to compile the
application.
This example illustrates using the SPT_THREAD_AWARE_NONBLOCK preprocessor directive in an
application:
#define SPT_THREAD_AWARE_NONBLOCK
#include <spthread.h>
main()
...
For information about including a preprocessor directive in an application by specifying the directive
in a compiler command option, see thec89(1) or the c99(1) reference page online or in the
Open System Services Shell and Utilities Reference Manual.
For non-regular files:
The spt_*z() set functions have the same behavior as the spt_*x() set of functions.
For C applications, the behavior of the function is the same whether you use the #define
SPT_THREAD_AWARE_NONBLOCK or the #define SPT_THREAD_AWARE_XNONBLOCK
preprocessor directive.
For C++ applications, the behavior of the function is the same whether you use the #define
SPT_THREAD_AWARE_PRAGMA_NONBLOCK or the #define
SPT_THREAD_AWARE_PRAGMA_XNONBLOCK preprocessor directive.
The spt_*z() set of nonblocking thread-aware functions for non-regular files are available on
systems running running J06.04 and later J-series RVUs and H06.15 and later H-series RVUs. To
use these functions see “Defining Thread-Aware Functions for Regular Files” (page 347).
Applications can explicitly call the functions listed in the Nonblocking Thread-Aware Functions
(Non-Regular Files Only) column of Table 59 (page 344) without setting any defines before including
the spthread.h header file.
Defining Thread-Aware Functions for Regular Files
Thread-aware functions for regular files are available on systems running J06.04 and later J-series
RVUs and H06.15 and later H-series RVUs. These functions are also nonblocking thread-aware
functions for non-regular files.
For C applications, a macro to map interface() to spt_interfacez() is available when
you use the #define SPT_THREAD_AWARE_XNONBLOCK preprocessor directive before including
spthread.h or when you use an equivalent compiler command option to compile the application.
For C++ applications, an alias to map interface() to spt_interfacez() is available when
you use the #define SPT_THREAD_AWARE_PRAGMA_XNONBLOCK preprocessor directive before
including spthread.h or when you use an equivalent compiler command option to compile the
application.
Thread-Aware and Nonblocking OSS Functions 347