Guardian Programmer's Guide

Table Of Contents
Writing a Command-Interpreter Monitor ($CMON)
Guardian Programmer’s Guide 421922-014
23 - 23
Controlling Change of Process Priority
The format of the Altpri^msg message is as follows:
The $CMON process must respond to an Altpri^msg message with an Altpri^reply
structure; the reply code must be either 0 to allow the priority change or 1 to reject the
priority change. The reply may also contain display text.
The format of the Altpri^reply structure is as follows:
Format of command-interpreter message -56 (Altpri^msg message):
STRUCT ALTPRI^MSG;
BEGIN
INT MSGCODE; ![0] value -56
INT USERID; ![1] user ID of user requesting
! change of priority
INT CIPRI; ![2] current priority of command
! interpreter
INT CIINFILE[0:11]; ![3] name of command file of
! TACL process
INT CIOUTFILE[0:11]; ![15] name of list file for the
! TACL process
INT CRTPID[0:3]; ![27] process ID of process whose
! priority is to be altered
INT PROGNAME[0:11]; ![31] expanded program file name
of
the process whose priority
is
to be altered
INT PRIORITY; ![43] new priority
INT PROCESS^HANDLE[0:9];![44] process handle of process
! whose priority is to be
! altered
END;
Note. The Altpri^msg message includes both the process ID (CRTPID field) and the process
handle of the target process. The process ID field is retained for compatibility with C-series
systems. A $CMON process running on a D-series system should always use the process-
handle field to identify the target process.
Format of Altpri^reply structure:
STRUCT ALTPRI^REPLY;
BEGIN
INT REPLYCODE; ![0] if 0, allows the priority to
! be changed; if 1, rejects the
! attempt to change priority
STRING REPLYTEXT[0:n]; ![1] optional display text;
! maximum length is 132 bytes
END;