mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-05 20:01:56 +00:00
Promote the private z_arch_* namespace, which specifies the interface between the core kernel and the architecture code, to a new top-level namespace named arch_*. This allows our documentation generation to create online documentation for this set of interfaces, and this set of interfaces is worth treating in a more formal way anyway. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
44 lines
895 B
C
44 lines
895 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
|
|
|
|
#include <arch/cpu.h>
|
|
|
|
#ifdef CONFIG_IRQ_OFFLOAD
|
|
/**
|
|
* @brief Run a function in interrupt context
|
|
*
|
|
* This function synchronously runs the provided function in interrupt
|
|
* context, passing in the supplied parameter. 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
|
|
*/
|
|
static inline void irq_offload(irq_offload_routine_t routine, void *parameter)
|
|
{
|
|
arch_irq_offload(routine, parameter);
|
|
}
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _SW_IRQ_H_ */
|