| United States-English |
|
|
|
![]() |
ACC Programmer's Reference Guide > Chapter 3 ZCOM Tables and Data StructuresZLU Tables |
|
The ZCOM logical unit table relates a terminal device or a program queue with a number or logical unit. The ZCOM logical units are called ZLUs to distinguish them from the HP-UX logical units (LUs). Each ZLU entry structure contains 40 bytes of data. The ZLU table is split into two logically distinct parts. The first part is the physical terminal area, and the second the dynamically assignable program ZLUs. The latter are used for program input queues. The ZLUs can be mapped so that a particular ZLU can point to any other ZLU. The individual ZLU data structure (zlu_type) layout is shown in Table 3-7 “Individual ZLU Data Structure (zlu_type)”. Table 3-7 Individual ZLU Data Structure (zlu_type)
ZCKSUM - ZLU checksum The checksum is used as an integrity check to ensure that a ZLU has not been altered while it is active. It is the 16-bit binary sum of bytes 3 to 18 of the ZLU entry (with any overflow discarded). It is calculated when the ZLU table entry is created. ZLTYPE - Type of ZLU The ZLU type values are shown in Table 3-8 “ZLU Type Values”. The type value is also used to indicate whether the ZLU is defined. Table 3-8 ZLU Type Values
* The logical terminal number is allocated by TTGEN from the TTGEN configuration file. ZPOINT - ZLU pointer or mapped node number The field is used to link the ZLU with the entity it represents. The meaning of the field is given in the table under ZLTYPE. ZMPZLU - Mapped ZLU number If the ZLU is type 3 (mapped ZLU), then this is the ZLU number (on the node as given by ZPOINT) onto which this ZLU is being mapped. If ZLU is not type 3, ZMPZLU is set to zero. ZMPZCS - Mapped ZLU checksum 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. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||