VMS Help System Services, $GETLKI *Conan The Librarian (sorry for the slow response - running on an old VAX) |
Returns information about the lock database on a system. The $GETLKI service completes asynchronously; for synchronous completion, use the Get Lock Information and Wait ($GETLKIW) service. The $GETLKI, $GETLKIW, $ENQ, $ENQW, and $DEQ services together provide the user interface to the Lock Management facility. Format SYS$GETLKI [efn] ,lkidadr ,itmlst [,iosb] [,astadr] [,astprm] [,nullarg] C Prototype int sys$getlki (unsigned int efn, unsigned int *lkidadr, void *itmlst, struct _iosb *iosb, void (*astadr)(__unknown_params), int astprm, unsigned int reserved); Arguments efn OpenVMS usage:ef_number type: longword (unsigned) access: read only mechanism: by value Number of the event flag to be set when $GETLKI completes. The efn argument is a longword containing this number; however, $GETLKI uses only the low-order byte. If you do not specify efn, $GETLKI sets event flag 0. lkidadr OpenVMS usage:lock_id type: longword (unsigned) access: modify mechanism: by reference Lock identification (lock ID) for the lock about which information is to be returned. The lock ID is the second longword in the lock status block, which was created when the lock was granted. The lkidadr argument is the address of this longword. If the value specified by lkidadr is 0 or -1, $GETLKI assumes a wildcard operation and returns information about each lock to which the calling process has access, one lock per call. To use the $GETLKI service, you must have read/write access to the lock ID. itmlst OpenVMS usage:item_list_3 type: longword (unsigned) access: read only mechanism: by reference Item list specifying the lock information that $GETLKI is to return. The itmlst argument is the address of a list of item descriptors, each of which describes an item of information. The list of item descriptors is terminated by a longword of 0. Refer to the OpenVMS System Services Reference Manual to view the item code diagram and descriptor fields table. iosb OpenVMS usage:io_status_block type: quadword (unsigned) access: write only mechanism: by reference I/O status block that is to receive the final completion status. The iosb argument is the address of a quadword. When $GETLKI is called, it sets the I/O status block to 0. When $GETLKI completes, it writes a condition value to the first longword in the quadword. The remaining two words in the quadword are unused. Although this argument is optional, Compaq strongly recommends that you specify it, for the following reasons: o If you are using an event flag to signal the completion of the service, you can test the I/O status block for a condition value to be sure that the event flag was not set by an event other than service completion. o If you are using the $SYNCH service to synchronize completion of the service, the I/O status block is a required argument for $SYNCH. o The condition value returned in R0 and the condition value returned in the I/O status block provide information about different aspects of the call to the $GETLKI service. The condition value returned in R0 gives you information about the success or failure of the service call itself; the condition value returned in the I/O status block gives you information about the success or failure of the service operation. Therefore, to accurately assess the success or failure of the call to $GETLKI, you must check the condition values returned in both R0 and the I/O status block. astadr OpenVMS usage:ast_procedure type: procedure value access: call without stack unwinding mechanism: by reference AST service routine to be executed when the service completes. The astadr argument is the address of this routine. If you specify this argument, the AST routine executes at the same access mode as the caller of the $GETLKI service. astprm OpenVMS usage:user_arg type: longword (unsigned) access: read only mechanism: by value AST parameter to be passed to the AST service routine specified by the astadr argument. The astprm argument is the longword parameter. nullarg OpenVMS usage:null_arg type: longword (unsigned) access: read only mechanism: by value Placeholding argument reserved by Compaq.
|