Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
ACC X.25 Protocol User's Guide > Chapter 4 X.25 Application Programming

ZX25CLOSE (3X) — ACC X.25

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

NAME

zx25close - Clean up resources from a previous zx25info call

SYNOPSIS

#include  <zcom/zcomsys.h>
#include <zcom/zcomx25.h>

int zx25close (zxip)
zx25info_type *zxip;

DESCRIPTION

Routine zx25close cleans up the resources which were allocated in the previous zx25info call. After this call, the zxip pointer should not be used in other "zx25..." calls.

The libraries libzx25.a, libzcom_c.a and libpthread.a must be linked into the calling program by giving the "-lzx25 -lzcom_c -lpthread" options to cc(1) or ld(1).

Threads Considerations

This routine may be called from a multi-threaded application using the POSIX (1003.1c) kernel threads API package. It has the following characteristics when called by multi-threaded applications:

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 that follows for more information on using this routine in a multi-threaded application.

PARAMETERS:

zxip

ZCOM X.25 access data structure (from zx25info call)

RETURN VALUE

Routine zx25close returns a 0 when successful. If there was a ZCOM error, it returns a negative value. See /opt/acc/include/zcom/zcomsys.h for the list of ZCOM error codes and their meanings.

NOTES

In a multi-threaded application, each thread must make a separate call to zx25info using a per-thread ZCOM X.25 access data buffer zxip. This routine should be called by each thread to clean up its own resources, using the per-thread data buffer.

EXAMPLE

#include       <zcom/zcomsys.h>
#include <zcom/zcomx25.h>

int ierr;
zx25info_type zxi;

if (ierr = zx25info (&zxi)) {
/* error return code */
}
else {
/* good return code */
}

/* ... calling other zx25*() routines with 'zxi' ... */

/* When finish, clean up resources */

if (ierr = zx25close (&zxi)) {
/* error return code */
}
else {
/* good return code */
}

FILES

/opt/acc/include/zcom/zcomsys.h

ZCOM system general include file, containing data types, data structures, constants, error codes, masks, etc.
(Note: must be the first include file before any other ZCOM include files).

/opt/acc/include/zcom/zcomx25.h

ZCOM X.25 access data structures. (Note: requires ANSI C compilation)

SEE ALSO

zx25info(3x)

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2000 Hewlett-Packard Development Company, L.P.