NAME
zltmg - Move a logical terminal between groups
SYNOPSIS
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h> /* if compiled with ANSI C (recommended) */
int32 zltmg (zap, nap)
zaddr_type *zap;
zaddr_type *nap;
DESCRIPTION
Routine zltmg moves the
logical terminal associated with a terminal ZLU to a new group of
logical terminals designated by another terminal ZLU. The first
terminal must not be the only terminal linked in its existing group.
After a successful move, the moved terminal will be a member
of the new group, and its MUX, PORT, and physical terminal linkage
are modified to match the new group.
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
zaddr | Terminal to be moved |
nzaddr | A group member of the new group |
NOTES
In the ZCOM subsystem, a group of logical terminals may be
defined to link to a single physical terminal. This routine allows
a logical terminal to be moved from one terminal group to another,
thus all its physical input/output may be handled by a different
physical device.
This call is intended for advanced
ZCOM programmers, and should be used with care.
RETURN VALUE
Routine zltmg 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;
zaddr_type nzaddr;
if (ierr = zltmg (&zaddr, &nzaddr)) {
<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/zcomcall.h | ZCOM routine function prototypes (Note: requires ANSI C compilation) |