ZCOM Tables and Data Structures

Response Records

Response Records

Response records are used to keep track of the issue-and-wait operations in the ZCOM subsystem. Currently, it is used for the send-with-wait (for example, zsend mode 8), port configuration (zport and zconfig routines), interface card control (zconfig), and remote API calls.

When a program requests a issue-and-wait operation, the LDM allocates a spare response record from the pool, sets up the sleeping address, and puts the caller to sleep. At a later time, when the operation is completed, the driver (LDM or DAM) sets up the return status and wakes up the waiter. The waiter then reads the return status and releases the response record back to the pool.

The layout of the response record (zrsp_type) is shown below.

Table 3-25

Response Record Format

 

 

 

 

 

 

Field Name

Field Description

Field Type

Size

(Bytes)

 

 

 

 

 

 

 

RPADDR

Waiter sleeping address

pointer

8

 

 

 

 

RPTYPE

Expected response type

uns.short

2

 

 

 

 

RPNODE

Remote node

uns.short

2

 

 

 

 

RPSEQN

Request/Response sequence number

uns.int

4

 

 

 

 

RPEXPT

Response expiration time

uns.int

4

 

 

 

 

RPCODE

Return status/error code

int

4

 

 

 

 

RPBUFQ

Response buffer queue

struct

56

 

 

 

 

 

RPADDR - Waiter sleeping address

 

 

The LDM puts an appropriate address into this field and puts the application to sleep on this address. This field is zero when the record is not being used. When this field is set, the remaining fields of the structure will contain valid information.

98

Chapter 3