ZCOM C I/F Library Routines

 

 

ZLUOPEN (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

The calling thread’s cancelability type must be

 

unsafe

PTHREAD_CANCEL_DEFERRED if cancellation

 

 

is enabled.

 

async-signal

It cannot be called from a signal handler.

 

unsafe

 

 

fork unsafe

It cannot be called by a child process after fork(2)

 

 

but before exec(2).

PARAMETERS

 

 

 

zap

ZCOM address (checksum is not used). Node must

 

 

be zero or contain the local node as defined in the

 

 

TTGEN configuration file.

 

mode

Open mode. Parameter is not used and should be

 

 

specified as zero.

 

fd

Returned file descriptor. If zluopen is returned

 

(Return Param) with error, this return parameter is undefined.

RETURN VALUE

Routine zluopen 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;

 

zaddr_type

zaddr;

 

int

mode;

 

int

fd;

if (ierr = zluopen (&zaddr, mode, &fd)) { /* error return code */

}

else {

Chapter 4

261