Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

spt_select(2) OSS System Calls Reference Manual
NAME
spt_select - Initiates thread-aware select( ) function for mulitple file descriptors
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series and J series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int spt_select(
int nfds,
fd_set *readfds,
fd_set *writefds,
fd_set *errorfds,
struct timeval *timeout);
PARAMETERS
See the select(2) reference page.
DESCRIPTION
This is a thread-aware version of the select() function that is used to check the status of multiple
file descriptors. To check the status of a single file descriptor, use the spt_select_single_np()
function, which provides better performance.
In spthread.h, a mapping of select() to spt_select() has been defined:
#define select(nfds, readfds, writefds, errorfds, timeout)\
spt_select(nfds, readfds, writefds, errorfds, timeout)
For C applications that do not use the nonblocking feature, this mapping is available only when
the correct preprocessor has been defined before including spthread.h, as follows:
#define SPT_THREAD_AWARE
#include <spthread.h>
For C applications that use the nonblocking feature, this mapping is available only when the
correct preprocessor has been defined before including spthread.h, as follows:
#define SPT_THREAD_AWARE_NONBLOCK
#include <spthread.h>
For C++ applications that do not use the nonblocking feature, this mapping is available only
when the correct preprocessor has been defined before including spthread.h, as follows:
#define SPT_THREAD_AWARE_PRAGMA
#include <spthread.h>
For C++ applications that use the nonblocking feature, this mapping is available only when the
correct preprocessor has been defined before including spthread.h, as follows:
#define SPT_THREAD_AWARE_PRAGMA_NONBLOCK
#include <spthread.h>
NOTES
To use this function in a threaded application that uses the Standard POSIX Threads library on
systems running J06.10 or later RVUs or H06.21 or later RVUs, you must perform all of the fol-
lowing tasks:
Include the spthread.h header file in the application.
7390 Hewlett-Packard Company 527186-023