ZCOM C I/F Library Routines
ZOPEN (3X)
| ZOPEN (3X) |
NAME | zopen – Create ZLU program input queue |
SYNOPSIS | |
#include | <zcom/zcomsys.h> |
#include | <zcom/zcomcall.h> /* if compiled with ANSI C (recommended) */ |
int32 zopen (zap, pflag, name, limit)
zaddr_type *zap;
uint32pflag;
char*name;
uint32limit;
DESCRIPTION Routine zopen allocates a free ZLU as a program input queue. This must be done before a program may receive any messages from terminals or other programs. The calling program’s PID is put into the zowner field of the zlu_type structure.
If a calling program (or thread) terminates without doing a zclos(3X) of a ZLU, that ZLU and its resources will remain allocated in the ZCOM system. When the program (or thread) is restarted later on, that ZLU can be
If it is not desirable to
A ZLU can be defined either as a primary or an auxiliary ZLU. Auxiliary ZLUs are used, for example, when a program is receiving messages from multiple sources, so that the messages can be read in a different order from which they were received. All programs must have a primary ZLU defined, because all status messages are returned to the primary ZLU.
In addition, a program’s primary ZLU is used as the source ZLU for messages sent by that program (unless overridden by a different ZLU specified in the message header). Refer to the zsend(3X) routine for details.
270 | Chapter 4 |