Open System Services Programmer's Guide
Example 91 File Descriptor Thread-Aware Function Usage
...
filedes = open(path, oflag, mode | O_NONBLOCK);
...
// Call thread-aware functions.
...
close(filedes);
...
Example 92 (page 400) shows preparing an open file descriptor for use with a thread-aware
function. It is not necessary to set the O_NONBLOCK flag.
Example 92 Open File Descriptor Thread-Aware Function Usage
...
fcntl(filedes, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
...
// Call thread-aware functions.
...
Example 93 (page 401) is a multithreaded program that performs I/O on multiple OSS regular files
using the thread-aware functions that are available when you use the define _PUT_MODEL_. With
these functions, you do not have to use Guardian functions to allow other threads to continue to
work while another thread waits for I/O to complete on an open file.
400 Using the POSIX User Thread (PUT) Model Library










