ZCOM Tables and Data Structures

ZCOM Kernel Data

ZC_SLOCK - Super IFT spinlock

This lock protects against deadlock situations while multiple IFTs need to be access simultaneously. A piece of code must obtain this lock first if it is going to lock multiple IFTs.

Each of the above fields is a data structure (zlock_t) with the data fields shown in Table 3-52.

Table 3-52

Super IFT spinlock (ZC_SLOCK) Data Structure

 

 

 

 

 

 

Field Name

 

Field Description

Field Type

Size

 

 

 

 

(Bytes)

 

 

 

 

 

LOCKP

 

Pointer to kernel spinlock structure

pointer

8

 

 

 

 

 

REFCOUNT

 

Lock reference count

int

4

 

 

 

 

 

SPARE1

 

Reserved, not used

int

4

 

 

 

 

 

LOCKP - Pointer to kernel spinlock structure

This is a pointer to the spinlock structure allocated dynamically from the kernel. It is used for the locking mechanism in the kernel.

REFCOUNT - Lock reference count

This is to support locks that could be acquired recursively in the ZCOM subsystem. Every time when the ZCOM lock is acquired, this count is incremented. When the ZCOM lock is released, this count is decremented. Only when this count reaches zero, the kernel lock (via the LOCKP pointer) is released.

Chapter 3

127

Page 127
Image 127
HP UX 11i v1 I/O Cards manual Lockp, Refcount