Download IBM RT PC Virtual Resource Manager Programming Reference

Transcript
Query ID (_queryi)
Description: The query function allows a component to find out information about queues served
by itself or another component.
The input parameter is an ID (either a PID, SLIH ID, or DID). The output is:
•
•
A number from 0 to 24 indicating the number of queues served by the process or
device driver
An array containing an entry for each queue indicating:
– The queue’s ID (QID)
– ECB associated with the queue (none, if server is a device driver).
A component may need to ascertain its own ID in the following situations:
•
•
When a process is executing its initialization routine
When a common routine, shared among multiple processes or device drivers, is
called.
A component can access the global variable _curid to determine its own ID.
Subroutine Call:
Return Code = _queryi (ID, # of queues, QID structure,
# of QID array elements);
Calling Register Conventions:
GPR2 = Server ID
GPR3 = Address of the returned number of queues. This is a word value aligned on a
word boundary in memory.
GPR4 = Word-aligned address of the queue ID array
Each queue has an entry in the array. Each entry consists of two words, the
queue’s identifier (QID) and the event control bit (ECB) mask of the queue.
GPR5 = Number of elements in the QID array.
Return Codes: contained in GPR2
0 = Successful.
Termination: The following conditions cause the system to abend:
•
5-12
Caller specified an invalid ID.
VRM Programming