ZCOM C I/F Library Routines

ZLTQUEUE (3X)

The following example illustrates the queue allocation algorithm:

Appln

Appln

Appln

Queue

Returned

Program

Nmbr

Label

Queue No.

 

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

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 attempts to allocate another queue to application 30.

RETURNVALUE

Routine zltqueue returns 0 if successful. Otherwise, a non-zeroerror

 

code is returned. See /opt/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 */

}

232

Chapter 4

Page 232
Image 232
HP UX 11i v1 I/O Cards manual Appln Queue Returned Program Nmbr Label Queue No