Modified to avoid copying too much data.

This commit is contained in:
Joel Sherrill
2000-05-16 19:15:25 +00:00
parent 8531dceb87
commit 250edf6f78

View File

@@ -276,6 +276,15 @@ void _CPU_Initialize(
void (*thread_dispatch) /* ignored on this CPU */
)
{
/*
* If something happened where the public Context_Control is not
* at least as large as the private Context_Control_overlay, then
* we are in trouble.
*/
if ( sizeof(Context_Control_overlay) < sizeof(Context_Control) )
_CPU_Fatal_error(0x100 + 1);
/*
* The thread_dispatch argument is the address of the entry point
* for the routine called at the end of an ISR once it has been
@@ -484,11 +493,11 @@ void _CPU_Context_Initialize(
*/
if ( _new_level == 0 )
*_the_context = *(Context_Control *)
&_CPU_Context_Default_with_ISRs_enabled;
*(Context_Control_overlay *)_the_context =
_CPU_Context_Default_with_ISRs_enabled;
else
*_the_context = *(Context_Control *)
&_CPU_Context_Default_with_ISRs_disabled;
*(Context_Control_overlay *)_the_context =
_CPU_Context_Default_with_ISRs_disabled;
addr = (unsigned32 *)_the_context;