From 2e71bd08bae61cd7259d8c362818b4a268a393e9 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 18 Dec 2023 12:02:30 +0100 Subject: tm27: Add optional TM27_INTERRUPT_VECTOR_DEFAULT Let the BSP define TM27_INTERRUPT_VECTOR_DEFAULT to more efficiently and reliably get the TM27 default interrupt vector. Update #3716. --- testsuites/validation/tx-call-within-isr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'testsuites/validation') diff --git a/testsuites/validation/tx-call-within-isr.c b/testsuites/validation/tx-call-within-isr.c index 63a9a6dc26..a7fce4368d 100644 --- a/testsuites/validation/tx-call-within-isr.c +++ b/testsuites/validation/tx-call-within-isr.c @@ -140,6 +140,7 @@ void CallWithinISRWait( const CallWithinISRRequest *request ) } } +#if !defined( TM27_INTERRUPT_VECTOR_DEFAULT ) static void CallWithinISRIsHandlerInstalled( void *arg, const char *info, @@ -152,13 +153,17 @@ static void CallWithinISRIsHandlerInstalled( (void) option; (void) handler_arg; - if ( handler == CallWithinISRHandler ) { + if ( handler == CallWithinISRHandler && handler_arg == NULL ) { *(bool *) arg = true; } } +#endif rtems_vector_number CallWithinISRGetVector( void ) { +#if defined( TM27_INTERRUPT_VECTOR_DEFAULT ) + return TM27_INTERRUPT_VECTOR_DEFAULT; +#else rtems_vector_number vector; for ( vector = 0; vector < BSP_INTERRUPT_VECTOR_COUNT; ++vector ) { @@ -177,6 +182,7 @@ rtems_vector_number CallWithinISRGetVector( void ) } return UINT32_MAX; +#endif } static void CallWithinISRInitialize( void ) -- cgit v1.2.3