diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-11-28 01:21:16 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-11-28 01:21:16 +0000 |
commit | 09b3a2facd278c727b99126b71f126a0d05943e3 (patch) | |
tree | 2c7337aecfe3ee4db579c131348692a980b23be0 | |
parent | 2001-11-14 Till Straumann <strauman@SLAC.Stanford.EDU> (diff) | |
download | rtems-09b3a2facd278c727b99126b71f126a0d05943e3.tar.bz2 |
2001-11-27 Joel Sherrill <joel@OARcorp.com>,
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.
-rw-r--r-- | c/src/exec/score/inline/rtems/score/thread.inl | 6 | ||||
-rw-r--r-- | c/src/exec/score/macros/rtems/score/thread.inl | 11 | ||||
-rw-r--r-- | c/src/exec/score/src/threadclose.c | 4 |
3 files changed, 20 insertions, 1 deletions
diff --git a/c/src/exec/score/inline/rtems/score/thread.inl b/c/src/exec/score/inline/rtems/score/thread.inl index f1a2410c95..0c98830f76 100644 --- a/c/src/exec/score/inline/rtems/score/thread.inl +++ b/c/src/exec/score/inline/rtems/score/thread.inl @@ -111,8 +111,10 @@ RTEMS_INLINE_ROUTINE void _Thread_Unblock ( RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); +#endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); } @@ -144,12 +146,14 @@ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) * FALSE otherwise. */ +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE boolean _Thread_Is_allocated_fp ( Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); } +#endif /*PAGE * @@ -161,10 +165,12 @@ RTEMS_INLINE_ROUTINE boolean _Thread_Is_allocated_fp ( * point context is now longer associated with an active thread. */ +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; } +#endif /*PAGE * diff --git a/c/src/exec/score/macros/rtems/score/thread.inl b/c/src/exec/score/macros/rtems/score/thread.inl index 26671093b6..749b1c5205 100644 --- a/c/src/exec/score/macros/rtems/score/thread.inl +++ b/c/src/exec/score/macros/rtems/score/thread.inl @@ -67,6 +67,7 @@ * */ +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #define _Thread_Restart_self() \ { \ if ( _Thread_Executing->fp_context != NULL ) \ @@ -74,6 +75,12 @@ \ _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \ } +#else +#define _Thread_Restart_self() \ + { \ + _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \ + } +#endif /*PAGE * @@ -96,8 +103,10 @@ * */ +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #define _Thread_Is_allocated_fp( _the_thread ) \ ( (_the_thread) == _Thread_Allocated_fp ) +#endif /*PAGE * @@ -105,8 +114,10 @@ * */ +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #define _Thread_Deallocate_fp() \ _Thread_Allocated_fp = NULL +#endif /*PAGE * diff --git a/c/src/exec/score/src/threadclose.c b/c/src/exec/score/src/threadclose.c index 4f2c9a6de5..882672d47e 100644 --- a/c/src/exec/score/src/threadclose.c +++ b/c/src/exec/score/src/threadclose.c @@ -53,6 +53,7 @@ void _Thread_Close( _User_extensions_Thread_delete( the_thread ); +#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); @@ -60,7 +61,8 @@ void _Thread_Close( the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) - (void) _Workspace_Free( the_thread->Start.fp_context ); + (void) _Workspace_Free( the_thread->Start.fp_context ); +#endif _Thread_Stack_Free( the_thread ); |