diff options
Diffstat (limited to 'testsuites/sptests/spextensions01/init.c')
-rw-r--r-- | testsuites/sptests/spextensions01/init.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/testsuites/sptests/spextensions01/init.c b/testsuites/sptests/spextensions01/init.c index 66e8fac260..59a22293c1 100644 --- a/testsuites/sptests/spextensions01/init.c +++ b/testsuites/sptests/spextensions01/init.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 embedded brains GmbH. All rights reserved. + * Copyright (C) 2016, 2017 embedded brains GmbH & Co. KG * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -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) |