[PATCH] config: Initialize task stack alllocator on demand
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Nov 13 09:24:22 UTC 2020
---
cpukit/include/rtems/confdefs/wkspace.h | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/cpukit/include/rtems/confdefs/wkspace.h b/cpukit/include/rtems/confdefs/wkspace.h
index d40194cbec..6df3b15ca0 100644
--- a/cpukit/include/rtems/confdefs/wkspace.h
+++ b/cpukit/include/rtems/confdefs/wkspace.h
@@ -146,8 +146,12 @@ const uintptr_t _Stack_Space_size = _CONFIGURE_STACK_SPACE_SIZE;
#ifdef CONFIGURE_TASK_STACK_ALLOCATOR_INIT
const Stack_Allocator_initialize _Stack_Allocator_initialize =
CONFIGURE_TASK_STACK_ALLOCATOR_INIT;
- #else
- const Stack_Allocator_initialize _Stack_Allocator_initialize = NULL;
+
+ RTEMS_SYSINIT_ITEM(
+ _Stack_Allocator_do_initialize,
+ RTEMS_SYSINIT_DIRTY_MEMORY,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+ );
#endif
const Stack_Allocator_allocate _Stack_Allocator_allocate =
@@ -155,12 +159,6 @@ const uintptr_t _Stack_Space_size = _CONFIGURE_STACK_SPACE_SIZE;
const Stack_Allocator_free _Stack_Allocator_free =
CONFIGURE_TASK_STACK_DEALLOCATOR;
-
- RTEMS_SYSINIT_ITEM(
- _Stack_Allocator_do_initialize,
- RTEMS_SYSINIT_DIRTY_MEMORY,
- RTEMS_SYSINIT_ORDER_MIDDLE
- );
#elif defined(CONFIGURE_TASK_STACK_ALLOCATOR) \
|| defined(CONFIGURE_TASK_STACK_DEALLOCATOR)
#error "CONFIGURE_TASK_STACK_ALLOCATOR and CONFIGURE_TASK_STACK_DEALLOCATOR must be both defined or both undefined"
--
2.26.2
More information about the devel
mailing list