Guardian Application Conversion Guide

Being Opened by and Communicating With a High-PIN Requester
Converting TAL Applications
096047 Tandem Computers Incorporated 3–47
Defining an Opener Table
If your server tracks its openers, it might define an opener table that uses a process ID
to identify an opener (primary process opener and backup process opener):
STRUCT .opener^table;
BEGIN
INT current^count;
STRUCT openers [0:max^openers - 1];
BEGIN
INT primary^process^id [0:3];
INT primary^file^number;
INT backup^process^id [0:3];
INT backup^file^number;
END;
END;
Convert your opener table to identify an opener using a process handle rather than a
process ID. To use the OPENER_LOST_ procedure (which is described later in this
subsection) to manage your opener table, define the table as follows:
Use a process handle to identify both a primary-process and backup-process
opener.
Declare the process-handle field for the backup-process opener immediately after
the process-handle field for the primary-process opener (that is, the fields must be
stored in a 20-word contiguous part of an entry).
Declare table entries as fixed length and contiguous.
Do not store variable-length items in the table. If necessary, save a pointer in the
table to a variable-length item.
Set the process handles for primary and backup openers in unused entries to null
values (all -1s).
An example of an opener table that the OPENER_LOST_ procedure can process is:
STRUCT .opener^table;
BEGIN
INT current^count;
STRUCT openers [0:max^openers - 1];
BEGIN
INT primary^process^handle
[0:ZSYS^VAL^PHANDLE^WLEN - 1];
INT backup^process^handle
[0:ZSYS^VAL^PHANDLE^WLEN - 1];
INT primary^file^number;
INT backup^file^number;
END;
END;