Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (L)
Guardian Procedure Calls Reference Manual—522629-013
8-17
LOCKINFO Procedure
(Superseded by FILE_GETLOCKINFO_ Procedure )
must be passed to LOCKINFO as previously returned. If it is modified in any way,
error 41 may be returned.
On output,
ctlwds returns the information LOCKINFO needs for the next call.
These four words must be passed exactly as they were returned on the previous
call to LOCKINFO.
buffersize input
INT:value
indicates the size, in bytes, of the buffer available for returned lock information.
The minimum value is 294. The size of the buffer determines how much
information can be returned on each LOCKINFO call.
buffer output
STRING .EXT:ref:*
specifies the buffer in which LOCKINFO will place the lock information. The
structure of the information returned in
buffer is described under
“Considerations.”
Considerations
•
Structure of returned data
The lock information returned by one call to LOCKINFO is mapped in the user-
supplied buffer using the structures on the next page.
The structure LIB describes one locked resource, and contains the byte offset from
the beginning of the buffer to the first LABINFO structure. LIB also contains the
number of holder/waiter entries (LABINFO occurrences) that are returned.
This TAL example describes the detailed layout of the structure:
STRUCT LIB ( * );
BEGIN
STRING
TYPE, ! File lock = 0, record lock = 1
LOCKLEN; ! Byte length of locked key (0 if
! not a key-sequenced file.)
INT
MISC, ! Miscellaneous flags
FILENAME[ 0:7 ], ! Subvol/filename of locked file
NUMLABS; ! Number of LABINFO entries
! returned
INT(32)
LABOFFSET; ! Byte offset from buffer start to
! first LABINFO
STRING
KEYVALUE[ 0:255 ]; ! Locked key value (if LOCKLEN > 0)
INT(32)
RECADDR = KEYVALUE; ! Locked record ID