[rtems commit] tmtests/tm26: Fix context switch to FP task

Sebastian Huber sebh at rtems.org
Sat May 30 14:50:46 UTC 2015


Module:    rtems
Branch:    master
Commit:    18d18e1c4b0118084b47e5a1d5da9bb518b8dbcc
Changeset: http://git.rtems.org/rtems/commit/?id=18d18e1c4b0118084b47e5a1d5da9bb518b8dbcc

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri May 29 21:20:31 2015 +0200

tmtests/tm26: Fix context switch to FP task

It is wrong to restore the floating point context here.  The
_Context_Switch() ends up in _Thread_Handler() which will call
_Thread_Restore_fp().  In _Thread_Do_dispatch() the FP restore is after
the context switch.

---

 testsuites/tmtests/tm26/task1.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
index 6cec7da..ee66218 100644
--- a/testsuites/tmtests/tm26/task1.c
+++ b/testsuites/tmtests/tm26/task1.c
@@ -439,9 +439,6 @@ rtems_task Low_task(
   thread_disable_dispatch();
 
   benchmark_timer_initialize();
-#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
-    _Context_Restore_fp( &_Thread_Get_executing()->fp_context );
-#endif
     _Context_Switch(
       &executing->Registers,
       &_Thread_Get_executing()->Registers



More information about the vc mailing list