From da016421cdcae2e386c7c64dbf8f0a11f8169dd8 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 13 Jul 2022 08:14:07 +0200 Subject: spextensions01: Fix assertion 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(-) (limited to 'testsuites') 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) -- cgit v1.2.3