Open System Services Programmer's Guide
Example 100 Function with put_RECEIVEREAD() and put_REPLYX()
...
while (1)
{
if (put_RECEIVEREAD(…) != 0) break;
...
// Do work.
...
if (put_REPLYX(…) != 0) break;
}
...
Example 101 shows a single thread calling the thread-aware put_RECEIVEREAD() function.
Using thread-aware $RECEIVE functions allows one or more threads to perform work on $RECEIVE,
without a thread unnecessarily blocking another thread.
416 Using the POSIX User Thread (PUT) Model Library