From 56d34e6ca99148083748345e07093cb7bdb83bb0 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 21 Feb 1996 14:32:02 +0000 Subject: Removed the internal thread objects and dispersed its contents to the thread handler (IDLE), MPCI object (SYSI now MP Receive) and initialize_executive_early (IO initialization). The SYSI task no longer exists in a single processor configuration. This reduces single processor Workspace requirements by a TCB and a stack which is often larger than the minimum stack size. Moving the IO initialization plus accompanying BSP hooks eliminated an initialization ordering problem in which a global task could be created before the MPCI was initialized. --- c/src/exec/sapi/src/exinit.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'c') diff --git a/c/src/exec/sapi/src/exinit.c b/c/src/exec/sapi/src/exinit.c index 52f24ed7d0..2ffd9f4839 100644 --- a/c/src/exec/sapi/src/exinit.c +++ b/c/src/exec/sapi/src/exinit.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -174,13 +173,6 @@ rtems_interrupt_level rtems_initialize_executive_early( multiprocessing_table->maximum_proxies ); - /* - * No threads should be created before this point!!! _Thread_Executing - * and _Thread_Heir are not set yet. - */ - - _Internal_threads_Initialization(); - _MPCI_Handler_initialization( multiprocessing_table->User_mpci_table, RTEMS_TIMEOUT @@ -198,12 +190,22 @@ rtems_interrupt_level rtems_initialize_executive_early( _RTEMS_API_Initialize( configuration_table ); + _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING ); + if ( cpu_table->pretasking_hook ) (*cpu_table->pretasking_hook)(); - _Internal_threads_Start(); + /* + * No threads should be created before this point!!! + * + * At this point all API extensions are in place. After the call to + * _Thread_Create_idle() _Thread_Executing will be set. + * and _Thread_Heir are not set yet. + */ - _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING ); + _Thread_Create_idle(); + + _MPCI_Create_server(); /* * Run the API and BSPs predriver hook. @@ -224,8 +226,8 @@ rtems_interrupt_level rtems_initialize_executive_early( if ( _System_state_Is_multiprocessing ) { _MPCI_Initialization(); - _Internal_threads_MP_Send_process_packet( - INTERNAL_THREADS_MP_SYSTEM_VERIFY + _MPCI_Internal_packets_Send_process_packet( + MPCI_PACKETS_SYSTEM_VERIFY ); } -- cgit v1.2.3