Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (n - p) put_RECEIVEREAD(2)
NAME
put_RECEIVEREAD - Initiates thread-aware function for reading $RECEIVE
LIBRARY
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll
SYNOPSIS
#include <pthread.h>
long put_RECEIVEREAD(
const short filenum,
char *buff er,
const short read_count,
int *count_read,
const long timelimit,
short *receive_info,
short *dialog_info);
PARAMETERS
filenum Specifies the Guardian file number for $RECEIVE (always 0).
buffer Specifies the data buffer.
read_count Specifies the number of bytes to read.
count_read Specifies the number of bytes read.
timelimit Specifies a FILE_COMPLETE-style time limit.
receive_info Specifies a FILE_GETRECEIVEINFO-style $RECEIVE info structure; NULL
may be passed if this information is not needed; must not be NULL if filenum’s
receive_depth is greater than 0 (zero).
dialog_info Specifies a FILE_GETRECEIVEINFO-style of dialog information (a short int
used by context-sensitive Pathway servers); NULL can be passed if this informa-
tion is not needed; NULL must be passed if receive_info is NULL.
DESCRIPTION
This thread-aware function is specifically for reading $RECEIVE. put_RECEIVEREAD() is
slightly patterned after a combination of the READUPDATEX procedure and the
FILE_GETRECEIVEINFO procedure, although its parameters do not match either of its modeled
procedures. A side effect of calling put_RECEIVEREAD ) puts the calling thread into a tran-
saction (via a call to the PUT_TMF_SetTxHandle( ) function), if the received message was tran-
sactional. The calling thread may be blocked to honor the filenum value’s receive depth. This
allows any number of threads to simultaneously call put_RECEIVEREAD(). Blocked threads
will be unblocked as other threads complete their calls to the put_REPLYX() function.
To use this function on systems running J06.10 or later RVUs or H06.21 or later RVUs, you must
perform all of the following tasks:
• Include the pthread.h header file in the application.
• Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
• Link the application to the zputdll library.
527186-023 Hewlett-Packard Company 5−249