Changeset 0600e86f in rtems


Ignore:
Timestamp:
08/15/96 21:05:21 (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
cd3868cd
Parents:
9ac3e76
Message:

_Thread_Start_multitasking: added code to initialize the floating point
context of the first thread to execute.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/src/thread.c

    r9ac3e76 r0600e86f  
    198198  _Thread_Executing = _Thread_Heir;
    199199
    200   _Context_Switch( &_Thread_BSP_context, &_Thread_Executing->Registers );
     200   /*
     201    * Get the init task(s) running.
     202    *
     203    * Note: Thread_Dispatch() is normally used to dispatch threads.  As
     204    *       part of its work, Thread_Dispatch() restores floating point
     205    *       state for the heir task.
     206    *
     207    *       This code avoids Thread_Dispatch(), and so we have to restore
     208    *       (actually initialize) the floating point state "by hand".
     209    *
     210    *       Ignore the CPU_USE_DEFERRED_FP_SWITCH because we must always
     211    *       switch in the first thread if it is FP.
     212    */
     213 
     214
     215#if ( CPU_HARDWARE_FP == TRUE )
     216   /*
     217    *  don't need to worry about saving BSP's floating point state
     218    */
     219
     220   if ( _Thread_Heir->fp_context != NULL )
     221     _Context_Restore_fp( &_Thread_Heir->fp_context );
     222#endif
     223
     224  _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers );
    201225}
    202226
  • cpukit/score/src/thread.c

    r9ac3e76 r0600e86f  
    198198  _Thread_Executing = _Thread_Heir;
    199199
    200   _Context_Switch( &_Thread_BSP_context, &_Thread_Executing->Registers );
     200   /*
     201    * Get the init task(s) running.
     202    *
     203    * Note: Thread_Dispatch() is normally used to dispatch threads.  As
     204    *       part of its work, Thread_Dispatch() restores floating point
     205    *       state for the heir task.
     206    *
     207    *       This code avoids Thread_Dispatch(), and so we have to restore
     208    *       (actually initialize) the floating point state "by hand".
     209    *
     210    *       Ignore the CPU_USE_DEFERRED_FP_SWITCH because we must always
     211    *       switch in the first thread if it is FP.
     212    */
     213 
     214
     215#if ( CPU_HARDWARE_FP == TRUE )
     216   /*
     217    *  don't need to worry about saving BSP's floating point state
     218    */
     219
     220   if ( _Thread_Heir->fp_context != NULL )
     221     _Context_Restore_fp( &_Thread_Heir->fp_context );
     222#endif
     223
     224  _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers );
    201225}
    202226
Note: See TracChangeset for help on using the changeset viewer.