summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-27 08:55:10 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-27 08:59:45 +0200
commit2501c64bb6654f5e4290709e0d83b94bfe51973f (patch)
tree65446eb1529222d6904b4985adfc206990889b6a /cpukit/include/rtems/score
parentbuild: Move RISCV_MAXIMUM_EXTERNAL_INTERRUPTS (diff)
downloadrtems-2501c64bb6654f5e4290709e0d83b94bfe51973f.tar.bz2
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.
Diffstat (limited to 'cpukit/include/rtems/score')
-rw-r--r--cpukit/include/rtems/score/objectdata.h3
-rw-r--r--cpukit/include/rtems/score/thread.h3
2 files changed, 2 insertions, 4 deletions
diff --git a/cpukit/include/rtems/score/objectdata.h b/cpukit/include/rtems/score/objectdata.h
index dc03f23461..ba2cb9c5b2 100644
--- a/cpukit/include/rtems/score/objectdata.h
+++ b/cpukit/include/rtems/score/objectdata.h
@@ -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 \
diff --git a/cpukit/include/rtems/score/thread.h b/cpukit/include/rtems/score/thread.h
index f5a56887a4..16430347af 100644
--- a/cpukit/include/rtems/score/thread.h
+++ b/cpukit/include/rtems/score/thread.h
@@ -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 \