Open System Services System Calls Reference Manual (G06.28+)

System Functions (s and S) spt_select(2)
NAME
spt_select - Initiates thread-aware select( ) function for mulitple le descriptors
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-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
le descriptors. To check the status of a single le descriptor, use the spt_select_single_np()
function, which provides better performance.
In spthread.h, a mapping of select() to spt_select() has been dened:
#dene 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 dened before including spthread.h as follows:
#dene 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 dened before including spthread.h as follows:
#dene 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 dened before including spthread.h as follows:
#dene 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 dened before including spthread.h as follows:
#dene SPT_THREAD_AWARE_PRAGMA_NONBLOCK
#include <spthread.h>
NOTES
To use a combination of the spt_select() and the spt_select_single_np() functions in a single
source le, you must explicitly call these functions.
527186-005 Hewlett-Packard Company 7285