NM and CM callable.
Enables/disables all software interrupts against the calling
process.
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).
The first parameter of the software interrupt procedure is the
file number of the file that caused the interrupt.
It is necessary to issue a call to the IODONTWAIT intrinsic
against the file in order to complete the request. When reading,
the buffer parameter is ignored in the FREAD call. The data is
moved to the array specified by the buffer parameter
of IODONTWAIT.
An incomplete FREAD/FWRITE request can be aborted by issuing
an FCONTROL call with an itemnum of 43 (abort nowait I/O).
Limitations:
Only message (MSG) files allow software interrupts.
No more than one incomplete FREAD/FWRITE can be outstanding
for a particular file.
The interrupt is held off while executing within the operating system,
with the following exceptions:
PAUSE allows the interrupt.
IOWAIT allows the interrupt if the filenum parameter is set to 0.
In these instances, the intrinsic is reinvoked after the interrupt
procedure executes.
Do not use FINTSTATE with remote files.