L4Re - L4 Runtime Environment
Interface using direct functionality.
+ Collaboration diagram for Interface using direct functionality.:

Modules

 Interface using direct functionality.
 

Functions

l4irq_t * l4irq_attach (int irqnum)
 Attach/connect to IRQ. More...
 
l4irq_t * l4irq_attach_ft (int irqnum, unsigned mode)
 Attach/connect to IRQ using given type. More...
 
l4irq_t * l4irq_attach_thread (int irqnum, l4_cap_idx_t to_thread)
 Attach/connect to IRQ. More...
 
l4irq_t * l4irq_attach_thread_ft (int irqnum, l4_cap_idx_t to_thread, unsigned mode)
 Attach/connect to IRQ using given type. More...
 
long l4irq_wait (l4irq_t *irq)
 Wait for specified IRQ. More...
 
long l4irq_unmask_and_wait_any (l4irq_t *unmask_irq, l4irq_t **ret_irq)
 Unmask a specific IRQ and wait for any attached IRQ. More...
 
long l4irq_wait_any (l4irq_t **irq)
 Wait for any attached IRQ. More...
 
long l4irq_unmask (l4irq_t *irq)
 Unmask a specific IRQ. More...
 
long l4irq_detach (l4irq_t *irq)
 Detach from IRQ. More...
 

Detailed Description

Function Documentation

◆ l4irq_attach()

l4irq_t* l4irq_attach ( int  irqnum)

Attach/connect to IRQ.

Parameters
irqnumIRQ number to request
Returns
Pointer to l4irq_t structure, 0 on error

This l4irq_attach has to be called in the same thread as l4irq_wait and caller has to be a pthread thread.

Examples:
examples/libs/libirq/loop.c.

◆ l4irq_attach_ft()

l4irq_t* l4irq_attach_ft ( int  irqnum,
unsigned  mode 
)

Attach/connect to IRQ using given type.

Parameters
irqnumIRQ number to request
modeInterrupt type,
See also
L4_irq_mode
Returns
Pointer to l4irq_t structure, 0 on error

This l4irq_attach has to be called in the same thread as l4irq_wait and caller has to be a pthread thread.

◆ l4irq_attach_thread()

l4irq_t* l4irq_attach_thread ( int  irqnum,
l4_cap_idx_t  to_thread 
)

Attach/connect to IRQ.

Parameters
irqnumIRQ number to request
to_threadAttach IRQ to this specified thread.
Returns
Pointer to l4irq_t structure, 0 on error

The pointer to the IRQ structure is used as a label in the IRQ object.

◆ l4irq_attach_thread_ft()

l4irq_t* l4irq_attach_thread_ft ( int  irqnum,
l4_cap_idx_t  to_thread,
unsigned  mode 
)

Attach/connect to IRQ using given type.

Parameters
irqnumIRQ number to request
to_threadAttach IRQ to this specified thread.
modeInterrupt type,
See also
L4_irq_mode
Returns
Pointer to l4irq_t structure, 0 on error

The pointer to the IRQ structure is used as a label in the IRQ object.

◆ l4irq_detach()

long l4irq_detach ( l4irq_t *  irq)

Detach from IRQ.

Parameters
irqIRQ data structure
Returns
0 on success, != 0 on error

◆ l4irq_unmask()

long l4irq_unmask ( l4irq_t *  irq)

Unmask a specific IRQ.

Parameters
irqIRQ data structure
Returns
0 on success, != 0 on error

This function is useful if a thread wants to wait for multiple IRQs using l4_ipc_wait.

◆ l4irq_unmask_and_wait_any()

long l4irq_unmask_and_wait_any ( l4irq_t *  unmask_irq,
l4irq_t **  ret_irq 
)

Unmask a specific IRQ and wait for any attached IRQ.

Parameters
unmask_irqIRQ data structure for unmask.
Return values
ret_irqReceived interrupt.
Returns
0 on success, != 0 on error

◆ l4irq_wait()

long l4irq_wait ( l4irq_t *  irq)

Wait for specified IRQ.

Parameters
irqIRQ data structure
Returns
0 on success, != 0 on error
Examples:
examples/libs/libirq/loop.c.

◆ l4irq_wait_any()

long l4irq_wait_any ( l4irq_t **  irq)

Wait for any attached IRQ.

Return values
irqReceived interrupt.
Returns
0 on success, != 0 on error