Open System Services Programmer's Guide
Non-Regular Files
For non-regular files, there are functions that can provide thread-aware behavior or both nonblocking
and thread-aware behavior:
• The spt_*() set of functions are thread aware only if the file descriptor is nonblocking. The
behavior of these functions depend on how the file descriptor O_NONBLOCK flag is set:
◦ If O_NONBLOCK (fd flag) is set, then the call will not block the other calling threads. It
might block the calling thread depending on the function call.
◦ If O_NONBLOCK (fd flag) is not set, then most functions block the entire process. Some
functions, like spt_fd_read_ready() and spt_fd_write_ready(), will block only
the calling thread.
The spt_*() set of functions are listed in the Thread-Aware Functions (Non-Regular Files
Only) column of Table 59 (page 344)
• The spt_*x() set of functions are thread-aware whether or not the file descriptor is
nonblocking. If the O_NONBLOCK flag is set, these functions are also nonblocking: they do
not block the calling thread or the other threads, and they return one of these errors to the
application: EAGAIN, EINPROGRESS, or EWOULDBLOCK. Otherwise, these functions block
the calling thread but allow other threads to run. These functions remove the need for the
application to explicitly set the O_NONBLOCK flag of the file descriptor to enable thread-aware
behavior.
The spt_*x() set of functions are are available on systems running J06.03 and later J-series
RVUs, H06.05 and later H-series RVUs, and G06.28 and later G-series RVUs, and are listed
in the Nonblocking Thread-Aware Functions (Non-Regular Files Only) column of Table 59
(page 344).
• For non-regular files, the spt_*z() set of functions have the same behavior as spt_*x()
functions. The spt_*z() set of functions are thread-aware whether or not the the
O_NONBLOCK flag of the file descriptor is set. If the O_NONBLOCK flag is set, these functions
are also nonblocking: they do not block the calling thread or the other threads, and they return
one of these errors to the application: EAGAIN, EINPROGRESS, or EWOULDBLOCK.
Otherwise, these functions block the calling thread but allow other threads to run.
The spt_*z() set of functions are supported on systems running J06.04 and later J-series
RVUs and H06.15 and later H-series RVUs, and are listed in the rightmost column,
Thread-Aware (Regular Files) and Nonblocking Thread-Aware (Non-Regular Files) Functions,
of Table 59 (page 344)
342 Using the Standard POSIX Threads Library