ZCOM C I/F Library Routines

ZNAME (3X)

 

ZNAME (3X)

NAME

zname – Find ZLU number from ZLU name

SYNOPSIS

#include

<zcom/zcomsys.h>

#include

<zcom/zcomcall.h> /* if compiled with ANSI C (recommended) */

int32 zname (zap, name)

zaddr_type *zap;

char*name;

DESCRIPTION

When a zopen call is issued to allocate a program ZLU, the application

 

assigns a symbolic name to the ZLU. Routine zname is used to find the

 

program ZLU number associated with a symbolic name. This allows an

 

application to easily find the program ZLUs of other ZCOM applications

 

running on the ZCOM subsystem. If the symbolic name is not associated

 

with a program ZLU (i.e., is not found in the node specified), the

 

returned ZLU (zaddr_type.zlu) is set to zero.

 

You must set the zap.node field prior to passing the zap parameter to this

 

routine. This will indicate on which node the application we’re looking

 

for is located. A value of 0 indicates the local node.

 

You must call zinit in your program before you can invoke zname

 

successfully.

 

 

The libraries libzcom_c.a and libpthread.a must be linked into the calling

 

program by giving the options “-lzcom_c -lpthread” to cc(1) or ld(1).

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.

266

Chapter 4