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>
This commit is contained in:
parent
9a0fe24ae9
commit
84942e4fbc
3 changed files with 5 additions and 5 deletions
|
@ -32,7 +32,7 @@ void posix_irq_unlock(unsigned int key);
|
|||
void posix_irq_full_unlock(void);
|
||||
int posix_get_current_irq(void);
|
||||
#ifdef CONFIG_IRQ_OFFLOAD
|
||||
void posix_irq_offload(void (*routine)(void *), void *parameter);
|
||||
void posix_irq_offload(void (*routine)(const void *), const void *parameter);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -16,13 +16,13 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_IRQ_OFFLOAD
|
||||
typedef void (*irq_offload_routine_t)(void *parameter);
|
||||
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 parameter. Useful for test code
|
||||
* context, passing in the supplied device. Useful for test code
|
||||
* which needs to show that kernel objects work correctly in interrupt
|
||||
* context.
|
||||
*
|
||||
|
@ -30,7 +30,7 @@ typedef void (*irq_offload_routine_t)(void *parameter);
|
|||
* @param parameter Argument to pass to the function when it is run as an
|
||||
* interrupt
|
||||
*/
|
||||
void irq_offload(irq_offload_routine_t routine, void *parameter);
|
||||
void irq_offload(irq_offload_routine_t routine, const void *parameter);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -351,7 +351,7 @@ int arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
|
|||
* @param routine Function to run in interrupt context
|
||||
* @param parameter Value to pass to the function when invoked
|
||||
*/
|
||||
void arch_irq_offload(irq_offload_routine_t routine, void *parameter);
|
||||
void arch_irq_offload(irq_offload_routine_t routine, const void *parameter);
|
||||
#endif /* CONFIG_IRQ_OFFLOAD */
|
||||
|
||||
/** @} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue