TACL Reference Manual
Built-In Functions and Variables
HP NonStop TACL Reference Manual—429513-018
9-169
#FILEGETLOCKINFO Built-In Function
participants
is a STRUCT that is to receive information about processes or transactions
that hold or wait for the lock; it must be defined as follows:
[#DEF participants STRUCT
BEGIN
STRUCT locker(0:mp-1); == mp = max participants
BEGIN
UINT flags; == <0> set for process
== clear for
== transaction
== <1:3> 0=waiting,
== 1=granted
== <4> internal use
== <5:15> reserved
FILLER 2; == reserved
PHANDLE process; == process holding or
== waiting for the lock
TRANSID transid == transaction holding or
REDEFINES process; == waiting for the lock
END;
END;
]
Result
The #FILEGETLOCKINFO built-in function returns a number that indicates the status
of the operation.
Status codes are listed in Table 9-10.
Table 9-10. #FILEGETLOCKINFO Status Codes
Code Meaning
0Success
-1 The control STRUCT is of the wrong size.
-2 The lockdesc STRUCT is of the wrong size.
-3 The participants STRUCT is of the wrong size. (This STRUCT can vary in
size, but it must always be a multiple of the size that would be required for
one participant.)
45 The participants STRUCT was too small to hold all the lock holders and
waiters for the locked resource in the lock description STRUCT. The call
was successful, but only the number of participants specified by max
participants were returned.
1 No more locks are available. No information was returned.
0Success