ACC Programmer's Reference Guide

Chapter 3 59
ZCOM Tables and Data Structures
ZLU Tables
its node and ZLU number. The number of a ZLU can be found using
zname given its name and node.
ZOWNER -PIDnumberofowner
When the ZL U 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 b y the ZLU. ZCLOCK is then reset to ZTIMER a nd
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 -ZLUlockpointer
It is a pointer to a lock structure used within the kernel. The l ock is used
to provide exclusive access to t he 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
ThisfieldistokeeptrackofthenumberofactivereferencestothisZLU.
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 wil l wait until all active requests
are cleared before closing and releases a ZLU.