Guardian Procedure Calls Reference Manual

Syntax for TAL Programmers
?SETTOG _64BIT_CALLS
?SOURCE EXTDECS(FILE_LOCKREC64_)
error := FILE_LOCKREC64_ ( filenum ! i
,[ tag ] ); ! i
Parameters
filenum
input
INT:value
is the number of an open file that identifies the file to be locked.
tag
input
INT(64):value
is for nowait I/O only. tag is a value you define that uniquely identifies the operation associated
with FILE_LOCKREC64_ .
NOTE: The system stores the tag value until the I/O operation completes. It then returns the
tag information to the program in either the tag parameter of the call to FILE_AWAITIO64_
or the tag field of the completion-info parameter of the call to FILE_COMPLETEL_, thus
indicating that the operation finished.
Returned Value
INT
A file-system error code that indicates the outcome of the call.
Considerations
EpTAL callers must set toggle
EpTAL callers must set the toggle _64BIT_CALLS before sourcing the FILE_LOCKREC64_
procedure section from EXTDECS.
Familiar semantics
Unless otherwise described, the semantic behavior of FILE_LOCKREC64_ is the same as that
of LOCKREC.
Nowait and FILE_LOCKREC64_
If FILE_LOCKREC64_ is called on a file opened for nowait I/O, then the operation must be
completed by either calling FILE_AWAITIO64_ or FILE_COMPLETEL_.
Default locking mode
If the record is already locked by another user when FILE_LOCKREC64_ is called, the process
requesting the lock is suspended and queued in a "locking" queue behind other users also
requesting to lock or read the record.
When the record becomes unlocked, the user at the head of the locking queue is granted
access to the record. If the user at the head of the locking queue is requesting a lock, it is
granted the lock and resumes execution. If the user at the head of the locking queue is
requesting a read operation, the read operation continues to completion.
454 Guardian Procedure Calls (F)