1 /* 2 * Copyright (c) 2015 Intel corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @file 9 * @brief IRQ Offload interface 10 */ 11 #ifndef ZEPHYR_INCLUDE_IRQ_OFFLOAD_H_ 12 #define ZEPHYR_INCLUDE_IRQ_OFFLOAD_H_ 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 typedef void (*irq_offload_routine_t)(const void *parameter); 19 20 /** 21 * @brief Run a function in interrupt context 22 * 23 * This function synchronously runs the provided function in interrupt 24 * context, passing in the supplied device. Useful for test code 25 * which needs to show that kernel objects work correctly in interrupt 26 * context. 27 * 28 * @param routine The function to run 29 * @param parameter Argument to pass to the function when it is run as an 30 * interrupt 31 */ 32 void irq_offload(irq_offload_routine_t routine, const void *parameter); 33 34 #ifdef __cplusplus 35 } 36 #endif 37 38 #endif /* _SW_IRQ_H_ */ 39