Overview   API Reference  

irq Struct Reference

Class implementing one virtual IRQ (mechanism). More...

#include <irq.hpp>

Inheritance diagram for irq:

Inheritance graph
[legend]
Collaboration diagram for irq:

Collaboration graph
[legend]

List of all members.

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).


Detailed Description

Class implementing one virtual IRQ (mechanism).

Member Enumeration Documentation

enum irq::state_bits [protected]

Enumerator:
PENDING  Hardware already asserted this IRQ.
MASKED  This IRQ is currently masked (blocked).


Constructor & Destructor Documentation

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.


Member Function Documentation

void irq::assert_irq ( void   )  [inline]

Asserts an IRQ, if not already pending, and wakes up the IRQ thread, if not masked.

If it is masked, the unmask operation wakes up the waiting IRQ thread.

References MASKED, PENDING, and state.


The documentation for this struct was generated from the following file:

L4vmm Reference Manual, written by Mario Schwalbe  © 2006-2008