ACC Programmer's Reference Guide
232 Chapter4
ZCOM C I/F Library Routines
ZLTQUEUE (3X)
The following example illustrates the queue allocation algorithm:
Queues 1, 3, and 4 are allocated for application 30, and queue 2 is
allocated for global usage in program B. Thus, because there is a current
limit of four queues, an error is returned to program G when it a ttempts
to allocate another queue to application 30.
Routine zltqueue returns 0 if successful. Otherwise, a non-zero error
code is returned. See /o pt/acc/include/zcom/zcomsys.h for the list of
ZCOM error codes and their meanings.
EXAMPLE
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h>
int32 ierr;
uint32 appln;
char label[6];
uint32 queue
if (ierr = zltqueue (appln, label, &queue)) {
/* error return code */
}
else {
/* good return code */
}
Appln
Program
Appln
Nmbr
Appln
Label
Queue
Queue No.
Returned
A 30 USAGE1 1 <-- first allocation
B 0 GLOBAL 2 <-- global allocation
C 40 CCCCCC 1 <-- different appln group
D 30 USAGE2 3 <-- same appln, diff usage
E 30 USAGE1 1 <-- data queue sharing
F 30 USAGE3 4 <-- same appln, diff usage
G 30 USAGE4 error <-- no more queues for apln 30










