record: Avoid dependency on object link order

For the application configuration option
CONFIGURE_RECORD_INTERRUPTS_ENABLED, define
bsp_interrupt_get_dispatch_table_slot() in the application configuration
to avoid issues with the object link order within the RTEMS libraries.

Enable this option in an associated test.

Close #5244.
This commit is contained in:
Lucian Silistru
2025-05-24 18:00:15 +03:00
committed by Kinsey Moore
parent b68e31a200
commit 45b1495a8a
4 changed files with 17 additions and 8 deletions

View File

@@ -39,7 +39,7 @@
#include <rtems/record.h>
/* The regular interrupt entries are registered in this table */
static rtems_interrupt_entry *
rtems_interrupt_entry *
_Record_Interrupt_dispatch_table[ BSP_INTERRUPT_DISPATCH_TABLE_SIZE ];
/*
@@ -49,13 +49,6 @@ _Record_Interrupt_dispatch_table[ BSP_INTERRUPT_DISPATCH_TABLE_SIZE ];
static rtems_interrupt_entry
_Record_Interrupt_entry_table[ BSP_INTERRUPT_DISPATCH_TABLE_SIZE ];
rtems_interrupt_entry **bsp_interrupt_get_dispatch_table_slot(
rtems_vector_number index
)
{
return &_Record_Interrupt_dispatch_table[ index ];
}
static void _Record_Interrupt_handler( void *arg )
{
uintptr_t vector;

View File

@@ -195,6 +195,17 @@ extern "C" {
);
#ifdef CONFIGURE_RECORD_INTERRUPTS_ENABLED
rtems_interrupt_entry **bsp_interrupt_get_dispatch_table_slot(
rtems_vector_number index
);
rtems_interrupt_entry **bsp_interrupt_get_dispatch_table_slot(
rtems_vector_number index
)
{
return &_Record_Interrupt_dispatch_table[ index ];
}
RTEMS_SYSINIT_ITEM(
_Record_Interrupt_initialize,
RTEMS_SYSINIT_LAST,

View File

@@ -30,6 +30,7 @@
#include "recorddata.h"
#include <rtems/rtems/intr.h>
#include <rtems/score/atomic.h>
#include <rtems/score/cpu.h>
#include <rtems/score/interr.h>
@@ -68,6 +69,8 @@ void _Record_Initialize( void );
void _Record_Interrupt_initialize( void );
extern rtems_interrupt_entry *_Record_Interrupt_dispatch_table[];
bool _Record_Thread_create(
struct _Thread_Control *executing,
struct _Thread_Control *created

View File

@@ -242,6 +242,8 @@ static void fatal_extension(
#define CONFIGURE_RECORD_EXTENSIONS_ENABLED
#define CONFIGURE_RECORD_INTERRUPTS_ENABLED
#define CONFIGURE_RECORD_FATAL_DUMP_BASE64_ZLIB
#define CONFIGURE_INIT