Guardian Application Conversion Guide
Being Opened by and Communicating With a High-PIN Requester
Converting C Applications
5–26 096047 Tandem Computers Incorporated
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
{
short current_count;
struct openers[max_openers]
{
short primary_process_id[4];
short primary_file_number;
short backup_process_id[4];
short backup_file_number;
};
};
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
{
short current_count;
struct openers[max_openers]
{
short primary_process_handle[ZSYS_VAL_PHANDLE_WLEN];
short backup_process_handle[ZSYS_VAL_PHANDLE_WLEN];
short primary_file_number;
short backup_file_number;
};
};