mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 22:51:19 +08:00
score: Fix objects local table initialization
The objects local table must be statically zero-initialized so that _Objects_Get() and _Objects_Get_no_protection() return NULL if no object is associated with the identifier. Update #4678.
This commit is contained in:
@@ -447,8 +447,7 @@ Objects_Information name##_Information = { \
|
||||
* multiprocessing (RTEMS_MULTIPROCESSING) is enabled.
|
||||
*/
|
||||
#define OBJECTS_INFORMATION_DEFINE( name, api, cls, type, max, nl, ex ) \
|
||||
static RTEMS_SECTION( ".noinit.rtems.content.local_table" ) \
|
||||
Objects_Control * \
|
||||
static Objects_Control * \
|
||||
name##_Local_table[ _Objects_Maximum_per_allocation( max ) ]; \
|
||||
static RTEMS_SECTION( ".noinit.rtems.content.objects" ) \
|
||||
type \
|
||||
|
||||
@@ -1149,8 +1149,7 @@ Thread_Information name##_Information = { \
|
||||
Objects_Control *_Thread_Allocate_unlimited( Objects_Information *information );
|
||||
|
||||
#define THREAD_INFORMATION_DEFINE( name, api, cls, max ) \
|
||||
static RTEMS_SECTION( ".noinit.rtems.content.local_table" ) \
|
||||
Objects_Control * \
|
||||
static Objects_Control * \
|
||||
name##_Local_table[ _Objects_Maximum_per_allocation( max ) ]; \
|
||||
static RTEMS_SECTION( ".noinit.rtems.content.objects" ) \
|
||||
Thread_Configured_control \
|
||||
|
||||
Reference in New Issue
Block a user