ACC Programmer's Reference Guide
158 Chapter4
ZCOM C I/F Library Routines
ZCLOS (3X)
Threads
Considerations
This routine may be called from multi-threaded application using the POSIX
(1003.1c) kernel threads API package.
This routine has the following
characteristics when called by a multi-threaded application
:
PARAMETERS
RETURN VALUE Routine zclos returns 0 if successful. Otherwise, a non-zero error code is
returned. See / opt/acc/include/zcom/zcomsys.h for the lis t of ZCOM
error codes and their meanings.
EXAMPLE
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h>
int32 ierr;
zaddr_type zaddr;
if (ierr = zclos (&zaddr)) {
/* error return code */
}
else {
/* good return code */
}
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).
zap ZCOM address to be returned to the system.










