   System_Services      $ENQ  :        Queues a new lock or lock conversion on a resource.  E        The $ENQ, $ENQW, $DEQ (Dequeue Lock Request), and $GETLKI (Get H        Lock Information) services together provide the user interface to$        the Lock Management facility.  ?        On Alpha systems, this service accepts 64-bit addresses.   
        Format   A          SYS$ENQ  [efn] ,lkmode ,lksb ,[flags] ,[resnam] ,[parid]   D                   ,[astadr] ,[astprm] ,[blkast] ,[acmode] ,[rsdm_id]                     ,[nullarg]          C Prototype  =          int sys$enq  (unsigned int efn, unsigned int lkmode,   =                       struct _lksb *lksb, unsigned int flags,   <                       void *resnam, unsigned int parid, void  G                       (*astadr)(__unknown_params), unsigned int acmode,   ?                       unsigned int rsdm_id, __optional_params);                  Arguments              efn           OpenVMS usage:ef_number(        type:         longword (unsigned)        access:       read only        mechanism:    by value C        Number of the event flag to be set when the request has been H        granted or canceled. Cancellation occurs if you use $DEQ with theE        cancel modifier or if the waiting request is chosen to break a G        deadlock. The efn argument is a longword containing this number; 2        however, $ENQ uses only the low-order byte.         
     lkmode  &        OpenVMS usage:longword_unsigned(        type:         longword (unsigned)        access:       read only        mechanism:    by value H        Lock mode requested. The lkmode argument is a longword specifying        this lock mode.              lksb  &        OpenVMS usage:lock_status_block(        type:         longword (unsigned)        access:       write only 7        mechanism:    by 32- or 64-bit reference (Alpha) .                      by 32-bit reference (VAX)B        Lock status block in which $ENQ writes the final completionF        status of the operation. The lksb argument is the 32- or 64-bitH        address (on Alpha systems) or the 32-bit address (on VAX systems)'        of the 8-byte lock status block.          	     flags   "        OpenVMS usage:mask_longword(        type:         longword (unsigned)        access:       read only        mechanism:    by value A        Flags specifying options for the $ENQ operation. The flags E        argument is a longword bit mask that is the logical OR of each 8        bit set, where each bit corresponds to an option.         
     resnam           OpenVMS usage:char_string0        type:         character-coded text string        access:       read onlyD        mechanism:    by 32- or 64-bit descriptor-fixed-length string'                      descriptor (Alpha) H                      by 32-bit descriptor-fixed-length string descriptor                      (VAX)A        Name of the resource to be locked by this lock. The resnam F        argument is the 32- or 64-bit address (on Alpha systems) or theG        32-bit address (on VAX systems) of a character string descriptor G        pointing to this name. The name string can be from 1 to 31 bytes         in length.          	     parid           OpenVMS usage:lock_id(        type:         longword (unsigned)        access:       read only        mechanism:    by value F        Lock identification of the parent lock. The parid argument is a5        longword containing this identification value.          
     astadr  "        OpenVMS usage:ast_procedure$        type:         procedure value1        access:       call without stack unwinding 7        mechanism:    by 32- or 64-bit reference (Alpha) .                      by 32-bit reference (VAX)A        AST service routine to be executed when the lock is either B        granted or converted. The astadr argument is the 32- or 64-C        bit address (on Alpha systems) or the 32-bit address (on VAX H        systems) of this routine. The AST is also delivered when the lockH        or conversion request is canceled. Cancellation occurs if you useH        $DEQ with the cancel modifier or if the waiting request is chosen        to break a deadlock.          
     astprm          OpenVMS usage:user_arg (        type:         quadword (unsigned)        access:       read only        mechanism:    by value E        AST parameter to be passed to the AST routine specified by the C        astadr argument. The astprm argument specifies this quadword         parameter.          
     blkast  "        OpenVMS usage:ast_procedure$        type:         procedure value1        access:       call without stack unwinding 7        mechanism:    by 32- or 64-bit reference (Alpha) .                      by 32-bit reference (VAX)F        Blocking AST routine to be called whenever this lock is grantedC        and is blocking any other lock requests. The blkast argument A        is the 32- or 64-bit address (on Alpha systems) or the 32- C        bit address (on VAX systems) of this routine. Locks that are H        converting to a new mode, but that are not yet granted in the new*        mode, do not receive blocking ASTs.         
     acmode           OpenVMS usage:access_mode(        type:         longword (unsigned)        access:       read only        mechanism:    by value F        Access mode to be associated with the resource name. The acmodeE        argument indicates the least privileged access mode from which +        locks can be queued on the resource.               rsdm_id           OpenVMS usage:longword (        type:         longword (unsigned)        access:       read only        mechanism:    by value @        Resource domain identification. The rsdm_id argument is aB        longword specifying the resource domain association throughD        which a new lock is to be taken. This argument is ignored forG        lock conversions and sublocks (parid is nonzero). Valid resource D        domain identifiers are returned from the $SET_RESOURCE_DOMAIND        service, or by the constants RSDM$K_SYSTEM_RSDM_ID or RSDM$K_B        PROCESS_RSDM_ID, which are defined by the $RSDMDEF macro in        STARLET.               nullarg           OpenVMS usage:null_arg (        type:         longword (unsigned)        access:       read only        mechanism:    by value 1        Placeholding argument reserved by Digital.               System_Services      $ENQW   C        The Enqueue Lock Request and Wait service queues a lock on a D        resource. The $ENQW service completes synchronously; that is,E        it returns to the caller when the lock has been either granted F        or converted. For asynchronous completion, use the Enqueue LockG        Request ($ENQ) service; $ENQ returns to the caller after queuing B        the lock request, without waiting for the lock to be eitherF        granted or converted. In all other respects, $ENQW is identicalG        to $ENQ. Refer to the $ENQ description for all other information         about the $ENQW service.   G        The $ENQ, $ENQW, $DEQ, and $GETLKI services together provide the 6        user interface to the Lock Management facility.  ?        On Alpha systems, this service accepts 64-bit addresses.   
        Format   B          SYS$ENQW  [efn] ,lkmode ,lksb ,[flags] ,[resnam] ,[parid]  E                    ,[astadr] ,[astprm] ,[blkast] ,[acmode] ,[rsdm_id]           C Prototype  >          int sys$enqw  (unsigned int efn, unsigned int lkmode,  >                        struct _lksb *lksb, unsigned int flags,  =                        void *resnam, unsigned int parid, void   D                        (*astadr)(__unknown_params), unsigned __int64  @                        astprm, void (*blkast)(__unknown_params),  A                        unsigned int acmode, unsigned int rsdm_id,   *                        __optional_params);           