MPE/iX Intrinsics Reference Manual (32650-90875)

Chapter 5 205
Command Definitions (FCONTROL - FLOCK)
FINTSTATE
FINTSTATE
NM and CM callable.
Enables/disables all software interrupts against the calling process.
Syntax
U16 U16V
oldstate
:=FINTSTATE(
interruptstate
);
Functional Return
oldstate
16-bit unsigned integer (assigned functional return)
Returns the previous state (enabled or disabled) of the software interrupts.
Parameters
interruptstate
16-bit unsigned integer by value (required)
Passes a flag enabling/disabling software interrupts through bit (15:1):
Value Meaning
1 Enable software interrupts (Default)
0 Disable software interrupts
Operation Notes
The software interrupt facility enables FREAD/FWRITE completion processing with an
interrupt procedure. A call to FREAD or FWRITE is necessary to initiate the I/O request. Both
of these intrinsics return to the process as soon as the request has been started. When the
operation completes, the program is interrupted and control goes to the chosen interrupt
procedure. This performs whatever processing is necessary and then resumes the original
program.
Software interrupts are armed for a particular file by specifying the interrupt procedure's
plabel
in an FCONTROL call with
itemnum
=48. If
aoption
(4:1) is set to 0, selecting
itemnum
=48 resets it to 1. Use IOWAIT or IODONTWAIT if
itemnum
=48 is used.
Software interrupts are inhibited just before entering an interrupt procedure. This is done
to stop unwanted nesting of the interrupt procedures. Each interrupt procedure should call
FINTEXIT to reenable other interrupts just before it exits.
Software interrupts are automatically inhibited before a
CTRLY trap procedure. The trap
procedure can allow software interrupts only by calling the FINTSTATE intrinsic. The
RESETCONTROL intrinsic restores the interrupt state of the process to its pre-
CTRLY value
(unless the trap procedure issues an FINTSTATE call; RESETCONTROL makes no change).