ZCOM C I/F Library Routines

 

 

PTFIND (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).

PARAMETERS

 

 

 

zap

ZCOM address of the terminal. It can be any terminal

 

 

ZLU within the group to be searched. If using method

 

 

1, only its MUX number is used (its port number,

 

 

hence its group, may be different from the target

 

 

terminal).

 

zskeyp

ptfind search key. The search key is set up by the

 

 

caller program before this routine is called. It consists

 

 

of a search mode, which indicates the method to be

 

 

used and the data (mode dependent) used in

 

 

searching. If bit ZCOM_PTFIND_NAVL (0x8000) is

 

 

set, ptfind searches the non-available terminals as

 

 

well.

 

 

When using this function in a 32-bit program that is

 

 

running on a 64-bit system, you must be especially

 

 

careful to zero out the zskeyp structure before using

 

 

it. Otherwise, your application may experience

 

 

ZCOM error -84 (ZEBPTR), “User buffer access

 

 

error”.

 

zptt (Return Param)

A pointer to a buffer into which the ZCOM physical

 

 

terminal table data will be placed. Note that if the

 

 

physical terminal is not found (i.e., ierr != 0), then no

 

 

data is moved into zptt.

 

len

Length in bytes of zptt buffer.

Chapter 4

155

Page 155
Image 155
HP UX 11i v1 I/O Cards Pointer to a buffer into which the Zcom physical, Terminal table data will be placed. Note that if