op_intrpt_enable_all()
Abstract
Permits delivery of all classes of interrupts to the invoking process, for an indefinite period.
Syntax
op_intrpt_enable_all ()
| Argument | Type | Description |
|---|---|---|
| no arguments |
Return Type
void
no return value
Example
Excerpt from: example model (models/std/eth_net); process model (eth_mac); state (FRM_END); enter execs.
/* enable all interrupts */
op_intrpt_enable_all ();
/* deallocate the frame stored for retransmission purposes */
op_pk_destroy (current_frame);
Details
By default, all interrupts are enabled. They can only be disabled by calls to the KP op_intrpt_disable(). Disabling a class of interrupts does not cause interrupts of that class to be removed from the event list; it only masks its delivery to the invoking process. Thus, if the interrupts that were disabled are later enabled before their scheduled time of delivery, they will in fact be delivered to the invoking process.
Purpose
Provides a mechanism to re-enable all interrupts that have been previously disabled via the KP op_intrpt_disable(). This is useful when several classes of interrupts have been disabled by a process, and some condition occurs which allows the process to clear the masks and enable all interrupts. Interrupts can be consecutively disabled and enabled any number of times.
Errors
- Program Abort: KP requires process context.
Reference
- Use the KP op_intrpt_disable() to disable a class of interrupts
- Use the KP op_intrpt_enable() to enable a class of interrupts
- Use the KP op_ev_cancel() to cancel a single interrupt
- Use the KP op_intrpt_clear_self() to cancel all pending self interrupts