Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (R)
Guardian Procedure Calls Reference Manual—522629-013
13-22
READLOCK[X] Procedures
Syntax for TAL Programmers
Parameters
filenum input
INT:value (Use with both READLOCK and READLOCKX)
is the number of an open file that identifies the file to be read.
buffer output
INT:ref:* (Use with READLOCK)
STRING .EXT:ref:* (Use with READLOCKX)
is an array in the application process where the information read from the file
returns.
read-count input
INT:value (Use with both READLOCK and READLOCKX)
is the number of bytes to be read: {0:4096}.
count-read output
INT:ref:1 (Use with READLOCK)
INT .EXT:ref:1 (Use with READLOCKX)
is for wait I/O only.
count-read returns a count of the number of bytes returned
from the file into
buffer.
tag input
INT(32):value (Use with both READLOCK and READLOCKX)
is for nowait I/O only.
tag is a value you define that uniquely identifies the
operation associated with this READLOCK[X].
CALL READLOCK[X] ( filenum ! i
,buffer ! o
,read-count ! i
,[ count-read ] ! o
,[ tag ] ); ! i
Note. The system stores the tag value until the I/O operation completes. The system then
returns the tag information to the program in the tag parameter of the call to AWAITIO[X],
thus indicating that the operation completed. If READLOCKX is used, you must call
AWAITIOX to complete the I/O. If READLOCK is used, you may use either AWAITIO or
AWAITIOX to complete the I/O.