GDSX (Extended General Device Support) Manual

Service Routines
Extended General Device Support (GDSX) Manual529931-001
8-63
^READUPDATELOCK[X]
Example
This example calls ^READUPDATE on the pseudo-$RECEIVE files, checks for a
completion of the I/O with ^AWAITIO, and processes the buffer.
INT .buf,
cnt,
err,
.rcvbuf,
rcvbufaddr = rcvbuf,
f;
CALL ^READUPDATE(0);
IDLE:
f := -1;
CALL ^AWAITIO(f, rcvbufaddr, cnt);
IF <> THEN
CALL ^FILEINFO(f, err)
ELSE
err := 0;
IF NOT err THEN
IF NOT f THEN BEGIN
.
handle pseudo-$RECEIVE message
.
END
ELSE BEGIN
.
handle I/O completion on other open file
END; .
^READUPDATELOCK[X]
The ^READUPDATELOCK[X] procedures are used for random processing of records
in a disk file. Because the working stack images of tasks are swapped to and from an
extended data segment during I/O operations, I/O must be performed to and from
global buffers.
The syntax, condition code settings, and considerations regarding these two
procedures are the same as the counterparts in the Guardian Procedure Calls
Reference Manual.
^RECEIVEINFO
This procedure obtains the 4-word process ID, message tag, error recovery (sync ID),
and request-related (file number, READ count, and I/O type) information associated
with the last message read from the $RECEIVE file.
If converted, TSCODE receives process handle data instead of process ID data, and
so USCODE tasks cannot call this procedure. Converted USCODE must instead call