Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
irq_offload.h File Reference

IRQ Offload interface. More...

Go to the source code of this file.

Typedefs

typedef void(* irq_offload_routine_t) (const void *parameter)
 

Functions

void irq_offload (irq_offload_routine_t routine, const void *parameter)
 Run a function in interrupt context. More...
 

Detailed Description

IRQ Offload interface.

Typedef Documentation

◆ irq_offload_routine_t

typedef void(* irq_offload_routine_t) (const void *parameter)

Function Documentation

◆ irq_offload()

void irq_offload ( irq_offload_routine_t  routine,
const void parameter 
)

Run a function in interrupt context.

This function synchronously runs the provided function in interrupt context, passing in the supplied device. Useful for test code which needs to show that kernel objects work correctly in interrupt context.

Additionally, when CONFIG_IRQ_OFFLOAD_NESTED is set by the architecture, this routine works to synchronously invoke a nested interrupt when called from an ISR context (i.e. when k_is_in_isr() is true). Note that not all platforms will have hardware support for this capability, and even on those some interrupts may be running at unpreemptible priorities.

Parameters
routineThe function to run
parameterArgument to pass to the function when it is run as an interrupt