Open System Services System Calls Reference Manual (G06.25+, H06.03+)
System Functions (s and S) spt_select(2)
NAME
spt_select - Initiates thread-aware select( ) function
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.
The following macro maps spt_select() to select() and has been defined in spthread.h:
#define select(nfds, readfds, writefds, errorfds, timeout)\
spt_select(nfds, readfds, writefds, errorfds, timeout)
This macro is available only when SPT_THREAD_AWARE has been defined before including
spthread.h, as follows:
#define SPT_THREAD_AWARE
RETURN VALUES
See the select(2) reference page. The following also applies:
• If the file descriptor becomes invalid (is closed by another thread), -1 is
returned with an errno of [EBADF].
• If a signal is received via the pthread_kill() function and is not blocked,
ignored, or handled, -1 is returned with an errno value of [EINTR].
STANDARDS CONFORMANCE
This function is an extension to the XPG4 Version 2 specification. Interfaces documented on this
reference page conform to the following industry standards:
• IEEE Std 1003.1c-1995, POSIX System Application Program Interface
The use of the header file spthread.h is an HP exception to the POSIX standard.
527186-003 Hewlett-Packard Company 7−137