Changeset 09b3a2f in rtems


Ignore:
Timestamp:
Nov 28, 2001, 1:21:16 AM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
b095808
Parents:
f3dc8e6
Message:

2001-11-27 Joel Sherrill <joel@…>,

This was tracked as PR89.

  • inline/rtems/score/thread.inl, macros/rtems/score/thread.inl, src/threadclose.c: Do not reference FP context if the CPU does not have an FPU.
Location:
c/src/exec/score
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/inline/rtems/score/thread.inl

    rf3dc8e6 r09b3a2f  
    112112RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
    113113{
     114#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    114115  if ( _Thread_Executing->fp_context != NULL )
    115116    _Context_Restore_fp( &_Thread_Executing->fp_context );
     117#endif
    116118
    117119  _CPU_Context_Restart_self( &_Thread_Executing->Registers );
     
    145147 */
    146148
     149#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    147150RTEMS_INLINE_ROUTINE boolean _Thread_Is_allocated_fp (
    148151  Thread_Control *the_thread
     
    151154  return ( the_thread == _Thread_Allocated_fp );
    152155}
     156#endif
    153157
    154158/*PAGE
     
    162166 */
    163167
     168#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    164169RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
    165170{
    166171  _Thread_Allocated_fp = NULL;
    167172}
     173#endif
    168174
    169175/*PAGE
  • c/src/exec/score/macros/rtems/score/thread.inl

    rf3dc8e6 r09b3a2f  
    6868 */
    6969
     70#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    7071#define _Thread_Restart_self()  \
    7172  {  \
     
    7576    _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \
    7677  }
     78#else
     79#define _Thread_Restart_self()  \
     80  {  \
     81    _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \
     82  }
     83#endif
    7784
    7885/*PAGE
     
    97104 */
    98105
     106#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    99107#define _Thread_Is_allocated_fp( _the_thread ) \
    100108        ( (_the_thread) == _Thread_Allocated_fp )
     109#endif
    101110
    102111/*PAGE
     
    106115 */
    107116
     117#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    108118#define _Thread_Deallocate_fp() \
    109119        _Thread_Allocated_fp = NULL
     120#endif
    110121
    111122/*PAGE
  • c/src/exec/score/src/threadclose.c

    rf3dc8e6 r09b3a2f  
    5454  _User_extensions_Thread_delete( the_thread );
    5555 
     56#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    5657#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
    5758  if ( _Thread_Is_allocated_fp( the_thread ) )
     
    6162
    6263  if ( the_thread->Start.fp_context )
    63   (void) _Workspace_Free( the_thread->Start.fp_context );
     64    (void) _Workspace_Free( the_thread->Start.fp_context );
     65#endif
    6466
    6567  _Thread_Stack_Free( the_thread );
Note: See TracChangeset for help on using the changeset viewer.