Open System Services Programmer's Guide
EAGAIN, EINPROGRESS, or EWOULDBLOCK. Otherwise, this function blocks the calling
thread but allows other threads to run.
◦ For regular files, this function blocks the entire process.
• spt_readz() is a thread-aware function with this behavior:
For non-regular files, this function does not require the file descriptor to be nonblocking
for this function to be thread-aware. If the file descriptor is nonblocking, this function does
◦
not block the calling thread, and returns one of these errors to the application: EAGAIN,
EINPROGRESS, or EWOULDBLOCK. Otherwise, this function blocks the calling thread
but allows other threads to run. (This is the same behavior as the spt_readx()function.)
◦ For regular files, this function blocks the calling thread but allows other threads to run.
This function does not require the file descriptor to be nonblocking for this function to be
thread-aware.
NOTE: To determine which RVUs support an OSS function, see Appendix A (page 438)
Table 59 System and Equivalent Thread-Aware Functions
Thread-Aware (Regular Files)
and Nonblocking
Nonblocking Thread-Aware
Functions (Non-Regular Files
Only)
Thread-Aware Functions
(Non-Regular Files Only)
Standard (Process-Blocking)
OSS Functions
Thread-Aware (Non-Regular
Files) Functions
spt_acceptx()spt_accept()accept()
—spt_alarm()—
spt_closez()spt_closex()spt_close()close()
spt_connectx()spt_connect()connect()
spt_dup2x()—dup2()
spt_fclosex()spt_fclose()fclose()
spt_fcntlz()spt_fcntlx()spt_fcntl()fcntl()
spt_fflushx()spt_fflush()fflush()
spt_fgetcx()spt_fgetc()fgetc()
spt_fgetsx()spt_fgets()fgets()
spt_getwcx()spt_getwc()fgetwc()
spt_fprintfx()spt_fprintf()fprintf()
spt_fputcx()spt_fputc()fputc()
spt_fputsx()spt_fputs()fputs()
spt_fputwcx()spt_fputwc()fputwc()
spt_freadx()spt_fread()fread()
spt_fsyncz()——fsync()
spt_ftruncatez()——ftruncate()
spt_ftruncate64z()——ftruncate64()
spt_fwritex()spt_fwrite()fwrite()
spt_getcx()spt_getc()getc()
spt_getcharx()spt_getchar()getchar()
344 Using the Standard POSIX Threads Library