LKWRD - 32-bit CP - V4R4.0

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

#### LKWRD

Prolog

Control Block Contents
LKWRD DSECT

Storage Layout

Cross Reference (Contains links to field and bit definitions)

#### LKWRD Prolog

     Name       : HCPLKWRD
     Description: Defer-lock "lockword"
     DSECT      : LKWRD
     Function   : The lockword the means of serializing
                  deferrable requests for access to a group of
                  data by different tasks.
     Located by : Various lockwords to protect specific classes
                  of data exist inside other control blocks
                  and data areas (VMDBK, SYSCM, HCPRCC, etc.)
     Created by : none (lockwords are static, or are "created"
                  within other dynamically created blocks
                  e.g., the VMDBK).
     Deleted by : none (lockwords are static, or are "deleted"
                  within other dynamically deleted blocks.

#### LKWRD Control Block Content

#### LKWRD DSECT

    Hex   Dec Type/Val   Lng Label (dup)    Comments
    ---- ---- --------- ---- -------------- --------
    0000    0 Structure      LKWRD          Defer-lock "lockword"
    0000    0 Dbl-Word     8 LKWCSWAP (0)   Doubleword updated by Compare and
                                            Swap
    0000    0 Signed       4 LKWSTATE       Current lock state. See module
                                            prologue of HCPLCK for details.
    0004    4 Address      4 LKWQUEUE       Pointer to chain of deferred
                                            CPEBK's
    0008    8 Dbl-Word     8 LKWQQTOD       TOD saved at last
                                            enqueue/dequeue. (Only stamped if
                                            there's a queue.)
    0010   16 Bitstring    1 LKWFLG1        Miscellaneous lock flags
              1... ....      LKWLTLK        X'80' Non-critical attribute,
                                            critical process count does not
                                            get decremented or incremented
                                            for this lock.
    0011   17 Bitstring    3 LKWDQLEN       Current length of defer queue.
    0014   20 Signed       4 LKWDYTOD       TOD saved at start of last
                                            "delay" period. It's the time the
                                            lock was last granted (if there
                                            was 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.
              00000003       LKWRDSIZ       (*-LKWRD)/8 Size of lockword in
                                            doublewords
         The following re-definition of LKWSTATE allows addressability to the
         last byte to check for a lockword held exclusive. This is NOT intended
         for general use: it is used by HCPWAI (Active Wait) for a specific
         purpose and may NOT be accurate for all locks. See the prologue of
         HCPLCK for a complete description of LKWSTATE.
    0000    0 Bitstring    1 * (3)          (don't care about 1st 3 bytes)
    0003    3 Bitstring    1 LKWSTAT4       4th byte of LKWSTATE
              .... ...1      LKWEXCL        X'01' Lock held EXCLUSIVE

#### LKWRD Storage Layout

    *** LKWRD - Defer-lock "lockword"
    *
    *     +---------------------------+---------------------------+
    *   0 |         LKWSTATE          |         LKWQUEUE          |
    *     +---------------------------+---------------------------+
    *   8 |                       LKWQQTOD                        |
    *     +------+--------------------+---------------------------+
    *  10 |:FLG1 |     LKWDQLEN       |         LKWDYTOD          |
    *     +------+--------------------+---------------------------+
    *  18
    *
    *** LKWRD - Defer-lock "lockword"

    *** Overlay for LKWSTATE in LKWRD
    *
    *     +--------------------+------+
    *   0 |////////////////////|:STAT4| 4
    *     +--------------------+------+
    *
    *** Overlay for LKWSTATE in LKWRD

#### LKWRD Cross Reference

    Symbol         Dspl Value
    -------------- ---- -----
    LKWCSWAP       0000
    LKWDQLEN       0011
    LKWDYTOD       0014
    LKWEXCL        0003 01
    LKWFLG1        0010
    LKWLTLK        0010 80
    LKWQQTOD       0008
    LKWQUEUE       0004
    LKWRDSIZ       0014 00000003
    LKWSTATE       0000
    LKWSTAT4       0003

This information is based on z/VM V4R4.0. Last updated on 29 Jul 2003 at 15:46:42 EDT.
Copyright IBM Corporation, 1990, 2003