#include <irq.hpp>


Public Member Functions | |
| irq (void) | |
| Default constructor. | |
| bool | is_pending (void) const |
| Returns whether this IRQ is currently pending. | |
| bool | is_masked (void) const |
| Returns whether this IRQ is currently masked. | |
| l4_umword_t | get_state (void) const |
| Returns this IRQ's current state. | |
| void | consume (void) |
| Consume by clearing the pending flag. | |
| void | mask (void) |
| Set the mask (block) flag to prevent the IRQ thread from being woken up on assertions. | |
| void | unmask (void) |
| Unset the mask (block) flag to allow the IRQ thread to be woken up on assertions and wake it up, if the IRQ is pending and was previously masked. | |
| void | wait (const l4_threadid_t client, const l4_timeout_t timeout) |
| Waits until the timeout expires for an IRQ to be asserted or returns immediately, if the IRQ is already pending and not masked. | |
| void | assert_irq (void) |
| Asserts an IRQ, if not already pending, and wakes up the IRQ thread, if not masked. | |
Protected Types | |
| enum | state_bits { PENDING = 0, MASKED = 1 } |
Protected Attributes | |
| bitops | state |
| This IRQ's current state (see state_bits). | |
enum irq::state_bits [protected] |
| irq::irq | ( | void | ) | [inline] |
Default constructor.
The initial state is MASKED, because omega0 initially masks its IRQs. Nevertheless this is neccessary too for devices asserting IRQs before a thread attaches to it.
| void irq::assert_irq | ( | void | ) | [inline] |