Open System Services System Calls Reference Manual (G06.25+, H06.03+)

spt_RECEIVEREAD(2) OSS System Calls Reference Manual
NAME
spt_RECEIVEREAD - Initiates thread-aware function for reading $RECEIVE
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
long spt_RECEIVEREAD(
const short lenum,
char *buffer,
const short read_count,
long *count_read,
const long timelimit,
short *receive_info,
short *dialog_info);
PARAMETERS
filenum Species the Guardian le number for $RECEIVE (always 0)
buffer Species the data buffer
read_count Species the number of bytes to read
count_read Species the number of bytes read
timelimit Species a FILE_COMPLETE-style time limit
receive_info Species a FILE_GETRECEIVEINFO-style $RECEIVE info structure; NULL
may be passed if this information is not needed; must not be NULL if lenums
receive_depth is greater than 0 (zero).
dialog_info Species 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 specically for reading $RECEIVE. spt_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 spt_RECEIVEREAD)*O puts the calling thread into a
transaction (via a call to the SPT_TMF_SetTxHandle( ) function), if the received message was
transactional. The calling thread may be blocked to honor the lenum values receive depth.
This allows any number of threads to simultaneously call spt_RECEIVEREAD( ). Blocked
threads will be unblocked as other threads complete their calls to the spt_REPLYX() function.
NOTES
Processing of the spt_RECEIVEREAD( ) function cannot be interrupted by specifying
spt_interrupt(SPT_INTERRUPTED). The spt_RECEIVEREAD() function responds to the
attempt by retrying the input or output.
To interrupt the spt_RECEIVEREAD( ) function, use one of the following function calls:
spt_wakeup(0, -1, 0, error) where error is any error number that can be recognized as a
return value for the spt_RECEIVEREAD( ) function.
7124 Hewlett-Packard Company 527186-003