Base implementation of Bottom Half Processor module for generic IRQ offloading.
More...
Base implementation of Bottom Half Processor module for generic IRQ offloading.
This module provides a generic mechanism to schedule an offload request (Top Half) from interrupt context and run the IRQ handler in thread context. A Bottom Half Processor interface stores a pointer to the device IRQ handler and context, which allows device agnostic IRQ offloading.
A user of this module can either use the Bottom Half Processor interface directly or use an existing implementation of a Bottom Half Processor (see Event based implementation of Bottom Half Processor)
- Author
- José I. Alamos jose..nosp@m.alam.nosp@m.os@ha.nosp@m.w-ha.nosp@m.mburg.nosp@m..de
|
struct | bhp |
| Bottom Half Processor descriptor. More...
|
|
|
typedef struct bhp | bhp_t |
| Forward declaration of the Bottom Half Processor descriptor.
|
|
typedef void(* | bhp_cb_t) (void *arg) |
| A Bottom Half Processor callback.
|
|
◆ bhp_cb_t
typedef void(* bhp_cb_t) (void *arg) |
A Bottom Half Processor callback.
- Parameters
-
[in] | arg | Context of the callback |
Definition at line 46 of file bhp.h.
◆ bhp_t
Forward declaration of the Bottom Half Processor descriptor.
Definition at line 39 of file bhp.h.
◆ bhp_irq_handler()
static void bhp_irq_handler |
( |
bhp_t * |
bhp | ) |
|
|
inlinestatic |
Call the IRQ handler associated to a Bottom Half Processor descriptor.
- Note
- It is possible, although not recommended, to call this function on ISR. This can be done e.g when it is required to process the handler during ISR.
- Parameters
-
[in] | bhp | Pointer to the Bottom Half Processor descriptor |
Definition at line 64 of file bhp.h.
◆ bhp_set_cb()
Set the callback for a Bottom Half Processor.
This function should be called inside the init function of a device that requires ISR offloading.
- Parameters
-
[in] | bhp | Pointer to the Bottom Half Processor |
[in] | cb | IRQ handler of the Bottom Half Processor |
[in] | ctx | Context of the IRQ handler |
Definition at line 79 of file bhp.h.