summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-26 19:26:28 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-26 19:26:28 +0000
commit17508d02bba1d47f4cf884b190566e72f69adb4e (patch)
treea1b8738fd54754c0210ac709a4b650bc7d3c4538 /c/src/exec/score/src
parent6b4a11bf4e24773780add82683b334dda89fce17 (diff)
downloadrtems-17508d02bba1d47f4cf884b190566e72f69adb4e.tar.bz2
Port of RTEMS to the Texas Instruments C3x/C4x DSP families including
a BSP (c4xsim) supporting the simulator included with gdb. This port was done by Joel Sherrill and Jennifer Averett of OAR Corporation. Also included with this port is a space/time optimization to eliminate FP context switch management on CPUs without hardware or software FP. An issue with this port was that sizeof(unsigned32) = sizeof(unsigned8) on this CPU. This required addressing alignment checks and assumptions as well as fixing code that assumed sizeof(unsigned32) == 4.
Diffstat (limited to 'c/src/exec/score/src')
-rw-r--r--c/src/exec/score/src/thread.c2
-rw-r--r--c/src/exec/score/src/threadclose.c4
-rw-r--r--c/src/exec/score/src/threaddispatch.c2
-rw-r--r--c/src/exec/score/src/threadinitialize.c2
-rw-r--r--c/src/exec/score/src/threadloadenv.c2
5 files changed, 10 insertions, 2 deletions
diff --git a/c/src/exec/score/src/thread.c b/c/src/exec/score/src/thread.c
index 9cb197e5bc..c71f025d39 100644
--- a/c/src/exec/score/src/thread.c
+++ b/c/src/exec/score/src/thread.c
@@ -63,7 +63,9 @@ void _Thread_Handler_initialization(
_Context_Switch_necessary = FALSE;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
+#endif
_Thread_Do_post_task_switch_extension = 0;
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 );
diff --git a/c/src/exec/score/src/threaddispatch.c b/c/src/exec/score/src/threaddispatch.c
index 311947cfa9..66a8996a12 100644
--- a/c/src/exec/score/src/threaddispatch.c
+++ b/c/src/exec/score/src/threaddispatch.c
@@ -92,7 +92,7 @@ void _Thread_Dispatch( void )
* operations.
*/
-#if ( CPU_HARDWARE_FP == TRUE )
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (heir->fp_context != NULL) && !_Thread_Is_allocated_fp( heir ) ) {
if ( _Thread_Allocated_fp != NULL )
diff --git a/c/src/exec/score/src/threadinitialize.c b/c/src/exec/score/src/threadinitialize.c
index 0d5154c400..fe4e9fa2b5 100644
--- a/c/src/exec/score/src/threadinitialize.c
+++ b/c/src/exec/score/src/threadinitialize.c
@@ -95,6 +95,7 @@ boolean _Thread_Initialize(
* Allocate the floating point area for this thread
*/
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
@@ -109,6 +110,7 @@ boolean _Thread_Initialize(
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
+#endif
/*
* Allocate the extensions area for this thread
diff --git a/c/src/exec/score/src/threadloadenv.c b/c/src/exec/score/src/threadloadenv.c
index c3493eeccd..af1233f709 100644
--- a/c/src/exec/score/src/threadloadenv.c
+++ b/c/src/exec/score/src/threadloadenv.c
@@ -45,11 +45,13 @@ void _Thread_Load_environment(
{
boolean is_fp = FALSE;
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( the_thread->Start.fp_context ) {
the_thread->fp_context = the_thread->Start.fp_context;
_Context_Initialize_fp( &the_thread->fp_context );
is_fp = TRUE;
}
+#endif
the_thread->do_post_task_switch_extension = FALSE;
the_thread->is_preemptible = the_thread->Start.is_preemptible;