[PATCH] spextensions01: Fix assertion
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Jul 13 06:17:31 UTC 2022
Commit 80090639a62b50d7d66614ca789e4592924a06e5 altered the system state
change. Account for this in assert_allocator_protected_thread_context().
---
testsuites/sptests/spextensions01/init.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/testsuites/sptests/spextensions01/init.c b/testsuites/sptests/spextensions01/init.c
index 66e8fac260..ceae2d3062 100644
--- a/testsuites/sptests/spextensions01/init.c
+++ b/testsuites/sptests/spextensions01/init.c
@@ -30,6 +30,11 @@ static int active_extensions = 2;
static rtems_id master_task;
+static bool before_initialization(void)
+{
+ return _System_state_Is_before_initialization(_System_state_Get());
+}
+
static bool before_multitasking(void)
{
return _System_state_Is_before_multitasking(_System_state_Get());
@@ -61,9 +66,13 @@ static void assert_life_protected_thread_context(void)
static void assert_allocator_protected_thread_context(void)
{
- assert(_Thread_Dispatch_is_enabled() || before_multitasking());
+ assert(
+ _Thread_Dispatch_is_enabled() ||
+ before_initialization() ||
+ before_multitasking()
+ );
assert(_RTEMS_Allocator_is_owner());
- assert(life_protected() || before_multitasking());
+ assert(life_protected());
}
static void assert_thread_dispatch_disabled_context(void)
--
2.35.3
More information about the devel
mailing list