Loading...
Searching...
No Matches
Interface using direct functionality.
IRQ handling library
Collaboration diagram for Interface using direct functionality.:

## Topics

| Interface using direct functionality.

## Functions

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

## Detailed Description

## Function Documentation

## l4irq_attach()

l4irq_t * l4irq_attach | ( | int | irqnum | ) |

Attach/connect to IRQ.

Parameters

  irqnum | IRQ 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.

References L4_CV.

## l4irq_attach_ft()

l4irq_t * l4irq_attach_ft | ( | int | irqnum,
|  | unsigned | mode )

Attach/connect to IRQ using given type.

Parameters

  irqnum | IRQ number to request
  mode | Interrupt 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.

References L4_CV.

## l4irq_attach_thread()

l4irq_t * l4irq_attach_thread | ( | int | irqnum,
|  | l4_cap_idx_t | to_thread )

Attach/connect to IRQ.

Parameters

  irqnum | IRQ number to request
  to_thread | Attach 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.

References L4_CV.

## 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

  irqnum | IRQ number to request
  to_thread | Attach IRQ to this specified thread.
  mode | Interrupt 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.

References L4_CV.

## l4irq_detach()

long l4irq_detach | ( | l4irq_t * | irq | ) |

Detach from IRQ.

Parameters

  irq | IRQ data structure

Returns
  0 on success, != 0 on error

References L4_CV.

## l4irq_unmask()

long l4irq_unmask | ( | l4irq_t * | irq | ) |

Unmask a specific IRQ.

Parameters

  irq | IRQ 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.

References L4_CV.

## 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_irq | IRQ data structure for unmask.
  [out] | ret_irq | Received interrupt.

Returns
  0 on success, != 0 on error

References L4_CV.

## l4irq_wait()

long l4irq_wait | ( | l4irq_t * | irq | ) |

Wait for specified IRQ.

Parameters

  irq | IRQ data structure

Returns
  0 on success, != 0 on error

Examples
  examples/libs/libirq/loop.c.

References L4_CV.

## l4irq_wait_any()

long l4irq_wait_any | ( | l4irq_t ** | irq | ) |

Wait for any attached IRQ.

Return values

  irq | Received interrupt.

Returns
  0 on success, != 0 on error

References L4_CV.