Programming Interface Information:
This information is NOT intended to be
used as Programming Interfaces of z/VM.

LCKBK

Prolog  

Control Block Contents  
   LCKBK DSECT

Storage Layout  

Cross Reference (Contains links to field and bit definitions)  


LCKBK Prolog

 NAME       : HCPLCKBK
 DESCRIPTION: LOCK BLOCK
 DSECT      : LCKBK
 FUNCTION   : HCPLCKBK IS USED TO SYNCHRONIZE EXECUTION FOR SECTIONS
              OF NONREENTERABLE CODE.  EACH SUCH SECTION OF CODE HAS
              ITS OWN UNIQUE 8 BYTE IDENTIFIER (NAME) WHICH IS PASSED
              TO THE LOCKING ROUTINES AS AN ARGUMENT.  THIS IDENTIFIER
              IS SAVED IN 'LCKNAME'.  A TASK THAT ATTEMPTS TO GET A
              LOCK THAT IS ALREADY HELD BY ANOTHER TASK IS FORCED TO
              WAIT UNTIL THE EARLIER TASK RELEASES THE LOCK.  WHILE THE
              TASK IS WAITING, IT IS REPRESENTED BY A CPEBK THAT
              IS TEMPORARILY CHAINED OFF OF 'LCKQUE'.  WHEN THE TASK
              HOLDING THE LOCK RELEASES IT, THE CPEBK REPRESENTING THE
              WAITING TASK IS STACKED SO THAT THE WAITING TASK RESUMES
              EXECUTION.
 LOCATED BY : SYSLOKQ   LOCK BLOCK ANCHOR: POINTS TO CHAIN OF LOCK BLOCKS.
              LCKNEXT   POINTER TO NEXT LOCK BLOCK IN CHAIN.
 CREATED BY : HCPLOC    WHEN A LOCK IS REQUESTED TO BE PUT ON A RESOURCE
              AND THAT RESOURCE IS NOT CURRENTLY LOCKED.
 DELETED BY : HCPLOC    WHEN A TASK RELEASES THE LOCK AND THERE ARE NO
              OTHER TASKS QUEUED ON THE LOCK.

 

LCKBK Control Block Content


LCKBK DSECT

Hex   Dec Type/Val   Lng Label (dup)    Comments
---- ---- --------- ---- -------------- --------
0000    0 Structure      LCKBK          LOCK BLOCK
0000    0 Signed       4 LCKNEXT        POINTER TO THE NEXT LOCK BLOCK
0004    4 Signed       4 LCKQUE         POINTER TO CPEXBLOK QUEUE
0008    8 Dbl-Word     8 LCKNAME (0)    LOCK SYMBOL
0008    8 Signed       4 LCKNAM1        FIRST FOUR BYTES OF SYMBOL
000C   12 Signed       4 LCKNAM2        SECOND FOUR BYTES OF SYMBOL
0010   16 Address      4 LCKIDR11       R11 of lock requestor
0014   20 Address      4 LCKIDR14       R14 of lock requestor
0018   24 Dbl-Word     8 LCKQQTOD       TOD saved at last
                                        enqueue/dequeue. (Only stamped if
                                        there's a queue for this symbolic
                                        defer lock.)
0020   32 Signed       4 LCKDQLEN       Current length of queue waiting
                                        for this symbolic defer lock.
                                        (Note: We could shorten LCKDQLEN
                                        to a halfword and regain 2
                                        bytes.)
0024   36 Signed       4 LCKDYTOD       TOD saved at start of last
                                        "delay" period. It's the time the
                                        lock was last granted (if it had
                                        a queue at that time) or the time
                                        at which the queue size last
                                        changed from 0 to 1. Units are
                                        TOD with bits 32-63 discarded.
          00000005       LCKSIZE        (*-LCKBK+7)/8 LOCK BLOCK SIZE IN
                                        DWORDS

 

LCKBK Storage Layout

          
*** LCKBK - LOCK BLOCK
*
*     +---------------------------+---------------------------+
*   0 |         LCKNEXT           |          LCKQUE           |
*     +---------------------------+---------------------------+
*   8 |         LCKNAM1           |         LCKNAM2           |
*     +---------------------------+---------------------------+
*  10 |         LCKIDR11          |         LCKIDR14          |
*     +---------------------------+---------------------------+
*  18 |                       LCKQQTOD                        |
*     +---------------------------+---------------------------+
*  20 |         LCKDQLEN          |         LCKDYTOD          |
*     +---------------------------+---------------------------+
*  28
*
*** LCKBK - LOCK BLOCK

 

LCKBK Cross Reference

Symbol         Dspl Value
-------------- ---- -----
LCKDQLEN       0020
LCKDYTOD       0024
LCKIDR11       0010
LCKIDR14       0014
LCKNAME        0008
LCKNAM1        0008
LCKNAM2        000C
LCKNEXT        0000
LCKQQTOD       0018
LCKQUE         0004
LCKSIZE        0024 00000005

This information is based on z/VM V4R2.0. Last updated on 17 Oct 2001 at 15:31:55 EDT.
Copyright IBM Corporation, 1990, 2001