ZCOM C I/F Library Routines

ZOPEN (3X)

Threads

This routine may be called from a multi-threaded application using the

Considerations

POSIX (1003.1c) kernel threads API package. This routine has the

 

following characteristics when called by a multi-threaded application:

 

cancellation point

Thread cancellation can occur when a thread

 

 

calls this routine.

 

async-cancel unsafe The calling thread’s cancelability type must be

 

 

PTHREAD_CANCEL_DEFERRED if

 

 

cancellation is enabled.

 

async-signal unsafe It cannot be called from a signal handler.

 

fork unsafe

It cannot be called by a child process after

 

 

fork(2) but before exec(2).

 

See the NOTES section below for more information on using this routine

 

in a multi-threaded application.

PARAMETERS

 

 

 

zap

ZCOM address (node, ZLU number, and

 

(Return Param) checksum). Node contains the local node as

 

 

defined in the TTGEN configuration file.

 

pflag

Set to ZcPRIMARY_ZLU(1) if this ZLU is to be

 

 

primary ZLU for this program. Any other value

 

 

(ZcAUXILIARY_ZLU) defines it as an auxiliary

 

 

ZLU. Bit ZCOM_ZOPEN_NEW (0x8000) tells

 

 

the routine to return an error if we are using an

 

 

existing ZLU.

 

name

Name to be given to the opened ZLU. The name

 

 

must be unique within the local node ZLU table.

 

 

The name may be a maximum of 7 characters

 

 

long, and must be null-terminated.

 

limit

Queue size limit. If 0 is specified, then the

 

 

default queue size limit (defined in the TTGEN

 

 

configuration file) is used.

RETURN VALUE Routine zopen 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.

272

Chapter 4