Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

cstxit, _cstxit - Definition of an STXIT routine

&pagelevel(4)&pagelevel

Definition

#include <stxit.h>

void cstxit(struct stxitp stxitpar);

cstxit defines an STXIT routine. This means that a routine written by the user can thus be assigned as an STXIT routine.
Detailed information on the programming of STXIT routines is provided in chapter “Contingency and STXIT routines” and the "Executive Macros" manual.

_cstxit also defines a STXIT routine.
In contrast to cstxit with _cstxit a pointer to an stxitpar structure is passed instead of the structure itself. This allows _cstxit to set the structure element err_set such that it can also be evaluated by the calling program.

Parameters

struct stxitp stxitpar

Structure in which the information required for the definition of an STXIT routine is to be specified. The structure is defined in <stxit.h> for ANSI-C as follows
(struct cont depends on the compilation mode):

struct stxitp
{
  addr     bufadr;     /* Address of the message for the program */
                       /* (OPINT) */
  err_set retcode;     /* Return code */
  struct cont contp;   /* Address of the STXIT routines */
  struct nest nestp;   /* Max. nesting level */
  struct stx  stxp;    /* Control of the cstxit call */
  struct diag diagp;   /* Diagnostic control */
  struct type typep;   /* Parameter transfer mode */
};
struct cont            /* Address of the STXIT routine for */
{                      /* the particular event class */
  void  (*prchk) (struct stxcontp stxcontpar);
  void  (*timer) (struct stxcontp stxcontpar);
  void  (*opint) (struct stxcontp stxcontpar);
  void  (*error) (struct stxcontp stxcontpar);
  void  (*runout) (struct stxcontp stxcontpar);
  void  (*brkpt) (struct stxcontp stxcontpar);
  void  (*abend) (struct stxcontp stxcontpar);
  void  (*pterm) (struct stxcontp stxcontpar);
  void  (*rtimer) (struct stxcontp stxcontpar);
};
struct nest            /* Max. nesting level for the */
{                      /* particular event class */
  char prchk;
  char timer;
  char opint;
  char error;
  char runout;
  char brkpt;
  char abend;
  char pterm;
  char rtimer;
  char filler;
};
struct stx              /* Control of the cstxit call for */
{                       /* the particular event class */
  stx_set prchk;
  stx_set timer;
  stx_set opint;
  stx_set error;
  stx_set runout;
  stx_set brkpt;
  stx_set abend;
  stx_set pterm;
  stx_set rtimer;
  stx_set filler;
};
struct diag             /* Diagnostic control for */
{                       /* the particular event class */
  diag_set prchk;
  diag_set timer;
  diag_set opint;
  diag_set error;
  diag_set runout;
  diag_set brkpt;
  diag_set abend;
  diag_set pterm;
  diag_set rtimer;
  diag_set filler;
};
struct type             /* Parameter transfer mode for */
{                       /* the particular event class */
  type_set prchk;
  type_set timer;
  type_set opint;
  type_set error;
  type_set runout;
  type_set brkpt;
  type_set abend;
  type_set pterm;
  type_set rtimer;
  type_set filler;
};
#define stx_set      char
#define old_stx      0
#define new_stx      4
#define del_stx      8
#define diag_set     char
#define ful_diag     0
#define min_diag     4
#define no_diag      8
#define err_set      char
#define no_err       0
#define par_err      4
#define stx_err      8
#define mem_err      12
#define type_set     char
#define par_opt      0
#define par_std      4  

Control of the cstxit call:

This data is used to control the execution of the cstxit call. It defines which actions are to be performed for the particular event class.

old_stx

No change is required for the corresponding event class. A previously assigned STXIT routine is retained. The remaining data for this event class is not evaluated.

new_stx

A new STXIT routine is assigned for the corresponding event class. The remaining data for this event class is evaluated in this case. The address of the routine, in particular, must be present in the corresponding entry of contp.

del_stx

The STXIT routine that was assigned to this point is deleted for the corresponding event class. The remaining data for this event class is not evaluated.

Diagnostic control:

ful_diag

For compatibility reasons the diagnostic control parameters are accepted syntactically but since conversion to ILCS are no longer evaluated. The routine is activated without a preceding diagnostic message.

min_diag

no_diag

Parameter transfer mode:

par_opt

The parameters are passed in registers 1-4.

par_std

The parameters are passed in a parameter list.
This is the only value permitted in C!

Return code:

no_err

The STXIT routine was defined correctly.

par_err

The parameter structure stxitpar was incorrectly supplied.

stx_err

Error in activating the STXIT routine.

mem_err

Error in the memory space request (when activating the STXIT routine).

Notes

You must supply the parameter structure stxitpar yourself.

To standardize initialization, a prototype (stxit_pr) has been defined and provided for you in the include file <stxit.h>. If you copy this prototype to one of your own defined structures of type stxitp; you will only need to set the fields for those event classes for which the assignment of an STXIT routine is to be changed.

For event class INTR, you must supply the address (stxitpar.bufadr) at which the information for the program is to be provided. The STXIT contingency routine can then fetch the message from this address and evaluate it.

See also

alarm, cenaco, raise, signal, sleep