ACC Programmer's Reference Guide
250 Chapter4
ZCOM C I/F Library Routines
ZOPEN (3X)
RETURN VALUE Routine zopen returns 0 if successful. Otherwise, a non-zero error code
is returned. See /opt/acc/include/zcom/zcomsys.h for the list of ZCOM
error codes and their meanings.
NOTES The first zopen call that a program makes will define the primary ZLU
irrespective of the value of pflag.Ifasubsequentzopen call is made with
pflag=1, the primary ZLU definition will be overridden. If multiple zopen
calls are made with pflag=1, then each call will override the previous
definition, leaving the primary ZLU defined as the one allocated in the
last zopen call. It is a good practice to define the primary ZLU in the first
call to zopen and not to redefine it unless the application program has a
good reason for doing so.
In a multi-threaded application, t he primary ZLU is shared globally. If a
thread opens a primary ZLU, it is effective for all threads.
Routine zopen can only allocate a program input ZLU within the local
node. The zaddr parameter in the call is a return parameter only and
contains the number of the local node as w ell a s the ZLU and checksum.
EXAMPLE
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h>
int32 ierr;
zaddr_type zaddr;
uint32 pflag;
char name[8];
uint32 limit;
if (ierr = zopen (&zaddr, pflag, name, limit)) {
/* error return code */
}
else {
/* good return code */
}










