From adf98bd423cabd47466b13d3432284da0d532176 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 21 Feb 1996 14:44:11 +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/score/include/rtems/score/thread.h | 70 +++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'c/src/exec/score/include/rtems/score/thread.h') diff --git a/c/src/exec/score/include/rtems/score/thread.h b/c/src/exec/score/include/rtems/score/thread.h index 654dddc825..d904df439b 100644 --- a/c/src/exec/score/include/rtems/score/thread.h +++ b/c/src/exec/score/include/rtems/score/thread.h @@ -160,6 +160,28 @@ typedef struct { void **extensions; } Thread_Control; +/* + * The following constants define the stack size requirements for + * the idle thread. + */ + + +#define THREAD_IDLE_STACK_SIZE STACK_MINIMUM_SIZE + +/* + * The following defines the information control block used to + * manage this class of objects. + */ + +EXTERN Objects_Information _Thread_Internal_information; + +/* + * The following define the thread control pointers used to access + * and manipulate the idle thread. + */ + +EXTERN Thread_Control *_Thread_Idle; + /* * The following context area contains the context of the "thread" * which invoked the start multitasking routine. This context is @@ -237,6 +259,18 @@ void _Thread_Handler_initialization ( unsigned32 maximum_proxies ); +/* + * _Thread_Create_idle + * + * DESCRIPTION: + * + * This routine creates the idle thread. + * + * WARNING!! No thread should be created before this one. + */ + +void _Thread_Create_idle( void ); + /* * _Thread_Start_multitasking * @@ -756,6 +790,42 @@ STATIC INLINE boolean _Thread_Is_proxy_blocking ( unsigned32 code ); +/* + * _Thread_Internal_allocate + * + * DESCRIPTION: + * + * This routine allocates an internal thread. + */ + +STATIC INLINE Thread_Control *_Thread_Internal_allocate( void ); + +/* + * _Thread_Internal_free + * + * DESCRIPTION: + * + * This routine frees an internal thread. + */ + +STATIC INLINE void _Thread_Internal_free ( + Thread_Control *the_task +); + +/* + * _Thread_Idle_body + * + * DESCRIPTION: + * + * This routine is the body of the system idle thread. + */ + +#if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE) +Thread _Thread_Idle_body( + unsigned32 ignored +); +#endif + #include #include -- cgit v1.2.3