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 Programmer's Reference Guide > Chapter 4 ZCOM C I/F Library Routines

ZLTUP (3X)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

zltup - Update logical terminal table

SYNOPSIS

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

int32 zltup (zap, ibuf, len, offset)

zaddr_type *zap;
char *ibuf;
int32 len;
int32 offset;

DESCRIPTION

Routine zltup is used to update information in the user area of the logical terminal area. This user area contains information such as details pertaining to the location of the terminal, a user-assigned terminal name and the extension area (of configurable size). For complete details see the section on logical terminal tables.

Part of the logical terminal table is assigned by TTGEN, the rest is initialized according to the parameters specified in the TTGEN configuration file. The table extension (if defined) is set up and initialized to zero by the system (unless LDATA is specified in the TTGEN configuration file to pre-define the values).

Typically, zltup is used to update the user data kept in the table extension area.

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 Considerations

This routine may be called from a 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:

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.

ibuf

Data buffer.

len

Byte length of buffer.

offset

Byte offset within the logical terminal table where the data in the buffer should be placed. See NOTES for information on finding the offsets.

NOTES

The offset returned by zltstore may be passed to zltup to update the allocated storage area in the extension area. To update the fields in the basic table, the offset may be worked out by the ZCOM_OFFSET macro (defined in zcomsys.h). For example, to get the offset for the application number field ltapno:

int32         offset;
zltt_type ltt, *lttp;

offset = ZCOM_OFFSET (*lttp, ltapno); <-- Both will work
offset = ZCOM_OFFSET (ltt, ltapno); <-- Both will work

RETURN VALUE

Routine zltup returns 0 if successful. Otherwise, a non-zero error 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;
char ibuf[size]; /* where size is user-defined; must be >= len */
int32 len;
int32 offset;

if (ierr = zltup (&zaddr, ibuf, len, offset)) {
/* error return code */
}
else {
/* good return code */
}

FILES

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

ZCOM subsystem general include file, containing data types, data structures, constants, error codes, masks, etc. Note that this must be the first include file before any other ZCOM include files.

/opt/acc/include/zcom/zcomcall.h

ZCOM routine function prototypes (requires ANSI C compilation).

SEE ALSO

ltqdget(3X), ltqdput(3X), zltqueue(3X), zltstore(3X)

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