Reference Guide
ZCOM Tables and Data Structures
ZLU Tables
Chapter 3 61
If the ZLU is not type 3, ZMPZCS is set to zero. Otherwise, this contains
the checksum of the mapped ZLU.
ZLNAME - Name of ZLU
Name assigned to the ZLU by the creator of the ZLU. If the ZLU is the
input queue to a program then this name is usually Z99999 - where
99999 is the program PID number. In this case the other 2 bytes are
space filled. The program ZLU name can be assigned by the zopen call
when the ZLU is allocated. The ZLU name can be found using zinfo given
its node and ZLU number. The number of a ZLU can be found using
zname given its name and node.
ZOWNER - PID number of owner
When the ZLU is created, the PID number of the creating program is
inserted in this field. When the program closes the ZLU, this field is
cleared. For system created ZLUs, this field is zero (e.g., terminal ZLUs
assigned by TTGEN).
ZTIMER, ZCLOCK - ZLU timeout control
These two parameters act together as a timer clock. The timer value
ZTIMER is set by an application program (via the time parameter in the
ztimr routine). This field is moved into ZCLOCK and decremented by 1
every second. When ZCLOCK reaches zero, a timer message is added to
the queue pointed to by the ZLU. ZCLOCK is then reset to ZTIMER and
the timer continues. If there are already 10 or more messages on the
queue, no timer message is queued. Timer processing stops when
ZTIMER and ZCLOCK are reset to zero via the ztimr routine (a zero time
parameter value).
ZLOCK - ZLU lock pointer
It is a pointer to a lock structure used within the kernel. The lock is used
to provide exclusive access to the ZLU in a multi-processor environment.
The locks are created one per ZLU by the ZCOM LDM driver during
ZCOM subsystem startup.
REFCNT - Reference count
This field is to keep track of the number of active references to this ZLU.
When the ZCOM subsystem processes an application request that refers
to a ZLU, it increment this count. On completion, the count is
decremented. On a zclos( ), the driver will wait until all active requests
are cleared before closing and releases a ZLU.