From 10ee41a8a37ac5e8d3537cb1c7d98b647903b97c Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 23 Jan 2023 14:56:31 +0100 Subject: tm27: Avoid function pointer casts Add TM27_USE_VECTOR_HANDLER to select the interrupt handler type used by the implementation. Close #4820. --- testsuites/validation/tx-call-within-isr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'testsuites/validation') diff --git a/testsuites/validation/tx-call-within-isr.c b/testsuites/validation/tx-call-within-isr.c index 0767f96edf..91560b70b0 100644 --- a/testsuites/validation/tx-call-within-isr.c +++ b/testsuites/validation/tx-call-within-isr.c @@ -76,11 +76,15 @@ void CallWithinISRClear( void ) Clear_tm27_intr(); } -static void CallWithinISRHandler( rtems_vector_number vector ) +#ifdef TM27_USE_VECTOR_HANDLER +static rtems_isr CallWithinISRHandler( rtems_vector_number arg ) +#else +static void CallWithinISRHandler( void *arg ) +#endif { CallWithinISRContext *ctx; - (void) vector; + (void) arg; ctx = &CallWithinISRInstance; CallWithinISRClear(); @@ -148,7 +152,7 @@ static void CallWithinISRIsHandlerInstalled( (void) option; (void) handler_arg; - if ( handler == (rtems_interrupt_handler) CallWithinISRHandler ) { + if ( handler == CallWithinISRHandler ) { *(bool *) arg = true; } } -- cgit v1.2.3