ZCOM C I/F Library Routines

 

 

 

ZOPEN (3X)

NOTES

The first zopen call that a program makes will define the primary ZLU

 

irrespective of the value of pflag. If a subsequent zopen 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, the 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 well as 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 */

 

 

 

}

 

 

 

FILES

 

 

 

 

 

/opt/acc/include/zcom/zcomsys.h

ZCOM subsystem general include

 

 

 

file, containing data types, data

 

 

 

structures, constants, error codes,

 

 

 

masks, etc. Note that this must be the

 

 

 

first include file before any other

 

 

 

ZCOM include files.

 

/opt/acc/include/zcom/zcomcall.h

ZCOM routine function prototypes

 

 

 

(requires ANSI C compilation).

SEE ALSO

zsend(3X), zname(3X), zluopen(3X), makezluname(3X)

 

 

 

 

 

Chapter 4

 

 

273