summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spextensions01/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/sptests/spextensions01/init.c')
-rw-r--r--testsuites/sptests/spextensions01/init.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/testsuites/sptests/spextensions01/init.c b/testsuites/sptests/spextensions01/init.c
index a056ba1612..59a22293c1 100644
--- a/testsuites/sptests/spextensions01/init.c
+++ b/testsuites/sptests/spextensions01/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2016, 2017 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * 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
@@ -36,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());
@@ -67,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)