CRE Programmer's Guide
CRE Service Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
6-38
CRE_Receive_Read_
CRE_Receive_Read_
CRE_Receive_Read_ calls the READUPDATE system procedure to request a record
from $RECEIVE.
buffer:read_count
is the data area (buffer) in which to store the record read and the maximum
number of bytes to read (
read_count).
count_read
is assigned the number of bytes read if a record is obtained.
time_out
if present, specifies how many hundredths of a second CRE_Receive_Read_
should wait for a message from $RECEIVE before timing out the request.
If
time_out is greater than or equal to zero, the CRE returns error 40, time out, if
it does not receive a message from $RECEIVE within
time_out hundredths of a
second.
If
time_out is less than zero or you do not specify time_out,
CRE_Receive_Read_ does not time out and waits as long as necessary to receive
a message on $RECEIVE.
sender_info
if present and its value is not equal to zero, is a pointer to a structure, called a
CRE^sender^model. CRE_Receive_Read_ stores in CRE^sender^model a
description of the process that sent the current message.
sender_info must be a pointer to a structure with the following layout:
STRUCT CRE^sender^model(*);
BEGIN
INT System^flag; ! -1 => system, 0 => user
INT Entry^number; ! Sender's requester number
INT Message^number; ! Used for message queuing
INT File^number; ! Sender's open number
INT Phandle[0:9]; ! Sender's phandle
INT Read^count; ! Read count from WRITEREAD
INT PROC CRE_Receive_Read_( buffer:read_count, count_read,
time_out, sender_info, flags )
EXTENSIBLE;
STRING .EXT buffer; ! out, required
INT read_count; ! in, required
INT .EXT count_read; ! out, required
INT(32) time_out; ! in, optional
INT .EXT sender_info; ! out, optional
INT flags; ! in, optional TNS, native