The IRQ and ICU class. More...
Collaboration diagram for IRQs:Data Structures | |
| class | L4::Irq |
| C++ version of an L4 IRQ. More... | |
Enumerations | |
| enum | L4_irq_flow_type { L4_IRQ_F_NONE = 0, L4_IRQ_F_LEVEL = 0x2, L4_IRQ_F_EDGE = 0x0, L4_IRQ_F_POS = 0x0, L4_IRQ_F_NEG = 0x4, L4_IRQ_F_BOTH = 0x8, L4_IRQ_F_LEVEL_HIGH = 0x3, L4_IRQ_F_LEVEL_LOW = 0x7, L4_IRQ_F_POS_EDGE = 0x1, L4_IRQ_F_NEG_EDGE = 0x5, L4_IRQ_F_BOTH_EDGE = 0x9, L4_IRQ_F_MASK = 0xf } |
| Interrupt flow types. More... | |
Functions | |
| l4_msgtag_t | l4_irq_attach (l4_cap_idx_t irq, l4_umword_t label, l4_cap_idx_t thread) L4_NOTHROW |
| Attach to an interrupt source. | |
| l4_msgtag_t | l4_irq_chain (l4_cap_idx_t irq, l4_umword_t label, l4_cap_idx_t slave) L4_NOTHROW |
| Chain an IRQ to another master IRQ source. | |
| l4_msgtag_t | l4_irq_detach (l4_cap_idx_t irq) L4_NOTHROW |
| Detach from an interrupt source. | |
| l4_msgtag_t | l4_irq_trigger (l4_cap_idx_t irq) L4_NOTHROW |
| Trigger an IRQ. | |
| l4_msgtag_t | l4_irq_receive (l4_cap_idx_t irq, l4_timeout_t to) L4_NOTHROW |
| Unmask and wait for specified IRQ. | |
| l4_msgtag_t | l4_irq_wait (l4_cap_idx_t irq, l4_umword_t *label, l4_timeout_t to) L4_NOTHROW |
| Unmask IRQ and wait for any message. | |
| l4_msgtag_t | l4_irq_unmask (l4_cap_idx_t irq) L4_NOTHROW |
| Unmask IRQ. | |
The IRQ and ICU class.
#include <l4/sys/irq.h>
The IRQ class provides access to abstract interrupts provided by the micro kernel. Interrupts may be hardware interrupts provided by the platform interrupt controller, virtual device interrupts provided by the micro kernel virtual devices (virtual serial or trace buffer), or IRQs (virtual interrupts that can be triggered by user programs).
IRQ objects can be created using a Factory, see Factory (l4_factory_create_irq()).
| enum L4_irq_flow_type |
Interrupt flow types.
|
inline |
Attach to an interrupt source.
| irq | IRQ to attach to. |
| label | Identifier of the IRQ. |
| thread | Thread to attach the interrupt to. |
Definition at line 281 of file irq.h.
References l4_utcb().
Here is the call graph for this function:
|
inline |
Chain an IRQ to another master IRQ source.
The chaining feature of IRQ objects allows to deal with shared IRQs. For chaining IRQs there must be a master IRQ object, bound to the real IRQ source. Note, the master IRQ must not have a thread attached to it. This function allows to add a limited number of slave IRQs to this master IRQ, with the semantics that each of the slave IRQs is triggered whenever the master IRQ is triggered. The master IRQ will be masked automatically when an IRQ is delivered and shall be unmasked when all attached slave IRQs are unmasked.
| irq | The master IRQ object. |
| label | Identifier of the IRQ. |
| slave | The slave that shall be attached to the master. |
Definition at line 288 of file irq.h.
References l4_utcb().
Here is the call graph for this function:
|
inline |
Detach from an interrupt source.
| irq | IRQ to detach from. |
Definition at line 295 of file irq.h.
References l4_utcb().
Here is the call graph for this function:
|
inline |
Trigger an IRQ.
| irq | IRQ to trigger. |
Note that this function is a send only operation, i.e. there is no return value except for a failed send operation. Especially l4_error() will return an error value from the message tag which still contains the IRQ protocol used for the send operation.
Use l4_ipc_error() to check for (send) errors.
Definition at line 301 of file irq.h.
References l4_utcb().
Here is the call graph for this function:
|
inline |
Unmask and wait for specified IRQ.
| irq | IRQ to wait for. |
| to | Timeout. |
Definition at line 307 of file irq.h.
References l4_utcb().
Referenced by L4Re::Util::Event_buffer_consumer_t< PAYLOAD >::process().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
inline |