summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/thread.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-04-09 15:17:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-08-31 17:30:17 +0200
commitd8172209b3f1288761ba410f52b89adeb56394fe (patch)
treeaff73c4b9cc562a3307231749d449fd439c83897 /cpukit/score/src/thread.c
parentscore: Use _Freechain_Push() (diff)
downloadrtems-d8172209b3f1288761ba410f52b89adeb56394fe.tar.bz2
score: Add _Stack_Allocator_do_initialize()
Do the stack allocator initialization and sanity check only if a user-provided stack allocator was configured. This avoids a dependency of _Thread_Handler_initialization() on the stack allocator. Update #3959.
Diffstat (limited to 'cpukit/score/src/thread.c')
-rw-r--r--cpukit/score/src/thread.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c
index a491753836..3dde437e72 100644
--- a/cpukit/score/src/thread.c
+++ b/cpukit/score/src/thread.c
@@ -20,10 +20,8 @@
#include <rtems/score/threadimpl.h>
#include <rtems/score/freechainimpl.h>
-#include <rtems/score/interr.h>
#include <rtems/score/objectimpl.h>
#include <rtems/score/scheduler.h>
-#include <rtems/score/wkspace.h>
#define THREAD_OFFSET_ASSERT( field ) \
RTEMS_STATIC_ASSERT( \
@@ -59,23 +57,9 @@ void _Thread_Initialize_information( Thread_Information *information )
void _Thread_Handler_initialization(void)
{
- rtems_stack_allocate_init_hook stack_allocate_init_hook =
- rtems_configuration_get_stack_allocate_init_hook();
- #if defined(RTEMS_MULTIPROCESSING)
- uint32_t maximum_proxies =
- _MPCI_Configuration.maximum_proxies;
- #endif
-
- if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
- rtems_configuration_get_stack_free_hook() == NULL)
- _Internal_error( INTERNAL_ERROR_BAD_STACK_HOOK );
-
- if ( stack_allocate_init_hook != NULL )
- (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
-
- #if defined(RTEMS_MULTIPROCESSING)
- _Thread_MP_Handler_initialization( maximum_proxies );
- #endif
+#if defined(RTEMS_MULTIPROCESSING)
+ _Thread_MP_Handler_initialization( _MPCI_Configuration.maximum_proxies );
+#endif
/*
* Initialize the internal class of threads. We need an IDLE thread