L4Re Operating System Framework
Interface and Usage Documentation
|
C IRQ interface, see L4::Irq for the C++ interface. More...
Enumerations | |
enum | L4_irq_mode { 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 , L4_IRQ_F_SET_WAKEUP = 0x10 , L4_IRQ_F_CLEAR_WAKEUP = 0x20 } |
Interrupt attributes. More... | |
C IRQ interface, see L4::Irq for the C++ interface.
The IRQ interface provides access to abstract interrupts provided by the microkernel. Interrupts may be
For hardware and virtual device interrupts the Irq object must be bound to an interrupt source, see Interrupt controller. To receive interrupts, the Irq object must be bound to a thread, see l4_rcv_ep_bind_thread().
IRQ objects can be created using a factory, see the Factory API (use l4_factory_create_irq()).
For the C++ interface refer to the L4::Irq API for an overview.
enum L4_irq_mode |
Interrupt attributes.
|
inline |
Detach from an interrupt source.
irq | The IRQ object that shall be detached. |
0 | Successfully detached, there was no interrupt pending. |
1 | Successfully detached, there was an interrupt pending. |
-L4_EPERM | No L4_CAP_FPAGE_S rights on the capability used to invoke this operation. |
Definition at line 299 of file irq.h.
References l4_irq_detach_u(), and l4_utcb().
|
inline |
Detach from this interrupt.
irq | The IRQ object that shall be detached. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb. |
0 | Successfully detached, there was no interrupt pending. |
1 | Successfully detached, there was an interrupt pending. |
-L4_EPERM | No L4_CAP_FPAGE_S rights on the capability used to invoke this operation. |
Definition at line 254 of file irq.h.
References l4_ipc_call(), L4_IPC_NEVER, l4_msgtag(), L4_PROTO_IRQ_SENDER, and l4_msg_regs_t::mr.
Referenced by L4::Irq::detach(), and l4_irq_detach().
|
inline |
Chain an IRQ to another master IRQ source.
irq | The master IRQ object. |
slave | The slave that shall be attached to the master. |
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 bound 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.
Definition at line 293 of file irq.h.
References l4_irq_mux_chain_u(), and l4_utcb().
|
inline |
Attach an IRQ to this multiplexer.
irq | The master IRQ object. |
slave | The slave that shall be attached to the master. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb. |
The chaining feature of IRQ objects allows to deal with shared IRQs. For chaining IRQs there must be an IRQ multiplexer (Irq_mux) bound to the real IRQ source. This function allows to add slave IRQs to this multiplexer.
Definition at line 242 of file irq.h.
References L4_CAP_FPAGE_RWS, l4_ipc_call(), L4_IPC_NEVER, l4_map_obj_control(), l4_msgtag(), l4_obj_fpage(), L4_PROTO_IRQ_MUX, l4_msg_regs_t::mr, and l4_fpage_t::raw.
Referenced by L4::Irq_mux::chain(), and l4_irq_mux_chain().
|
inline |
Unmask and wait for specified IRQ.
irq | The IRQ object that shall be unmasked. |
to | Timeout. |
Definition at line 311 of file irq.h.
References l4_irq_receive_u(), and l4_utcb().
Referenced by L4Re::Util::Event_buffer_consumer_t< PAYLOAD >::process().
|
inline |
Unmask and wait for this IRQ.
irq | The IRQ object that shall be unmasked. |
timeout | Timeout. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb. |
Definition at line 269 of file irq.h.
References l4_ipc_call(), l4_msgtag(), L4_PROTO_IRQ, and l4_msg_regs_t::mr.
Referenced by l4_irq_receive(), and L4::Irq::receive().
|
inline |
Trigger an IRQ.
irq | The IRQ object that shall be triggered. |
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 305 of file irq.h.
References l4_irq_trigger_u(), and l4_utcb().
Referenced by l4_semaphore_up().
|
inline |
Trigger the object.
irq | The IRQ object that shall be triggered. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb. |
Definition at line 262 of file irq.h.
References L4_IPC_BOTH_TIMEOUT_0, l4_ipc_send(), l4_msgtag(), and L4_PROTO_IRQ.
Referenced by l4_irq_trigger(), and L4::Triggerable::trigger().
|
inline |
Unmask IRQ.
irq | The IRQ object that shall be unmasked. |
Definition at line 324 of file irq.h.
References l4_irq_unmask_u(), and l4_utcb().
|
inline |
Unmask this IRQ.
irq | The IRQ object that shall be unmasked. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb. |
Irq::wait() and Irq::receive() operations already include an unmask(), do not use an extra unmask() in these cases.
Definition at line 285 of file irq.h.
References L4_IPC_NEVER, l4_ipc_send(), l4_msgtag(), L4_PROTO_IRQ, and l4_msg_regs_t::mr.
Referenced by l4_irq_unmask().
|
inline |
Unmask IRQ and wait for any message.
irq | The IRQ object that shall be unmasked. |
label | Receive label. |
to | Timeout. |
Definition at line 317 of file irq.h.
References l4_irq_wait_u(), and l4_utcb().
|
inline |
Unmask IRQ and (open) wait for any message.
irq | The IRQ object that shall be unmasked. |
label | The protected label shall be received here. |
timeout | Timeout. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb. |
Definition at line 276 of file irq.h.
References l4_ipc_send_and_wait(), l4_msgtag(), L4_PROTO_IRQ, and l4_msg_regs_t::mr.
Referenced by l4_irq_wait().