zephyr/include/irq_offload.h
Tomasz Bursztyka 84942e4fbc irq: Change offload API to take a constant parameter
All ISRs are meant to take a const struct device pointer, but to
simplify the change let's just move the parameter to constant and that
should be fine.

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00

41 lines
883 B
C

/*
* Copyright (c) 2015 Intel corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief IRQ Offload interface
*/
#ifndef ZEPHYR_INCLUDE_IRQ_OFFLOAD_H_
#define ZEPHYR_INCLUDE_IRQ_OFFLOAD_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef CONFIG_IRQ_OFFLOAD
typedef void (*irq_offload_routine_t)(const void *parameter);
/**
* @brief 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.
*
* @param routine The function to run
* @param parameter Argument to pass to the function when it is run as an
* interrupt
*/
void irq_offload(irq_offload_routine_t routine, const void *parameter);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SW_IRQ_H_ */