FINTSTATE [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation
MPE/iX Intrinsics Reference Manual
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
0 Disable software interrupts
1 Enable 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).
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.
Related Information
Intrinsics None
Commands None
Manuals Accessing Files Programmer's Guide (32650-90017)
and Interprocess Communication Programmer's Guide
(32650-90019)
MPE/iX 5.0 Documentation