forked from Imagelibrary/rtems
2001-05-09 Joel Sherrill <joel@OARcorp.com>
* src/exinit.c: Slightly rework initialization so there is a valid thread as _Thread_Executing when the pre_tasking hook is called. This allows one directives and malloc to potentially use mutex protection.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2001-05-09 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* src/exinit.c: Slightly rework initialization so there
|
||||||
|
is a valid thread as _Thread_Executing when the pre_tasking
|
||||||
|
hook is called. This allows one directives and malloc
|
||||||
|
to potentially use mutex protection.
|
||||||
|
|
||||||
2001-03-29 Joel Sherrill <joel@OARcorp.com>
|
2001-03-29 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
* Per PR126, configuration structures now match docs.
|
* Per PR126, configuration structures now match docs.
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
#include <rtems/score/sysstate.h>
|
#include <rtems/score/sysstate.h>
|
||||||
|
|
||||||
#include <rtems/score/apiext.h>
|
#include <rtems/score/apiext.h>
|
||||||
|
#if 0
|
||||||
|
#include <rtems/score/apimutex.h>
|
||||||
|
#endif
|
||||||
#include <rtems/score/copyrt.h>
|
#include <rtems/score/copyrt.h>
|
||||||
#include <rtems/score/heap.h>
|
#include <rtems/score/heap.h>
|
||||||
#include <rtems/score/interr.h>
|
#include <rtems/score/interr.h>
|
||||||
@@ -221,19 +224,24 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
|
|
||||||
_System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
|
_System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
|
||||||
|
|
||||||
if ( cpu_table->pretasking_hook )
|
|
||||||
(*cpu_table->pretasking_hook)();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* No threads should be created before this point!!!
|
* No threads should be created before this point!!!
|
||||||
|
* _Thread_Executing and _Thread_Heir are not set.
|
||||||
*
|
*
|
||||||
* At this point all API extensions are in place. After the call to
|
* At this point all API extensions are in place. After the call to
|
||||||
* _Thread_Create_idle() _Thread_Executing will be set.
|
* _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set.
|
||||||
* and _Thread_Heir are not set yet.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_Thread_Create_idle();
|
_Thread_Create_idle();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Scheduling can properly occur now as long as we avoid dispatching.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( cpu_table->pretasking_hook )
|
||||||
|
(*cpu_table->pretasking_hook)();
|
||||||
|
|
||||||
#if defined(RTEMS_MULTIPROCESSING)
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_MPCI_Create_server();
|
_MPCI_Create_server();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
2001-05-09 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* src/exinit.c: Slightly rework initialization so there
|
||||||
|
is a valid thread as _Thread_Executing when the pre_tasking
|
||||||
|
hook is called. This allows one directives and malloc
|
||||||
|
to potentially use mutex protection.
|
||||||
|
|
||||||
2001-03-29 Joel Sherrill <joel@OARcorp.com>
|
2001-03-29 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
* Per PR126, configuration structures now match docs.
|
* Per PR126, configuration structures now match docs.
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
#include <rtems/score/sysstate.h>
|
#include <rtems/score/sysstate.h>
|
||||||
|
|
||||||
#include <rtems/score/apiext.h>
|
#include <rtems/score/apiext.h>
|
||||||
|
#if 0
|
||||||
|
#include <rtems/score/apimutex.h>
|
||||||
|
#endif
|
||||||
#include <rtems/score/copyrt.h>
|
#include <rtems/score/copyrt.h>
|
||||||
#include <rtems/score/heap.h>
|
#include <rtems/score/heap.h>
|
||||||
#include <rtems/score/interr.h>
|
#include <rtems/score/interr.h>
|
||||||
@@ -221,19 +224,24 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
|
|
||||||
_System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
|
_System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
|
||||||
|
|
||||||
if ( cpu_table->pretasking_hook )
|
|
||||||
(*cpu_table->pretasking_hook)();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* No threads should be created before this point!!!
|
* No threads should be created before this point!!!
|
||||||
|
* _Thread_Executing and _Thread_Heir are not set.
|
||||||
*
|
*
|
||||||
* At this point all API extensions are in place. After the call to
|
* At this point all API extensions are in place. After the call to
|
||||||
* _Thread_Create_idle() _Thread_Executing will be set.
|
* _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set.
|
||||||
* and _Thread_Heir are not set yet.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_Thread_Create_idle();
|
_Thread_Create_idle();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Scheduling can properly occur now as long as we avoid dispatching.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( cpu_table->pretasking_hook )
|
||||||
|
(*cpu_table->pretasking_hook)();
|
||||||
|
|
||||||
#if defined(RTEMS_MULTIPROCESSING)
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_MPCI_Create_server();
|
_MPCI_Create_server();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user