summaryrefslogtreecommitdiffstats
path: root/testsuites/tmtests/tm26/task1.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-26 10:32:08 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-03-05 11:36:19 +0100
commit222dc775838c73708054db6283723027c5deb56c (patch)
tree13ef9e9fa22774f804cef04a61d459dc7d2fd89e /testsuites/tmtests/tm26/task1.c
parentscore: Simplify and fix signal delivery (diff)
downloadrtems-222dc775838c73708054db6283723027c5deb56c.tar.bz2
score: Add and use _Thread_Do_dispatch()
The _Thread_Dispatch() function is quite complex and the time to set up and tear down the stack frame is significant. Split this function into two parts. The complex part is now in _Thread_Do_dispatch(). Call _Thread_Do_dispatch() in _Thread_Enable_dispatch() only if necessary. This increases the average case performance. Simplify _Thread_Handler() for SMP configurations. Update #2273.
Diffstat (limited to 'testsuites/tmtests/tm26/task1.c')
-rw-r--r--testsuites/tmtests/tm26/task1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
index 96859404ac..5d74872ea9 100644
--- a/testsuites/tmtests/tm26/task1.c
+++ b/testsuites/tmtests/tm26/task1.c
@@ -99,6 +99,10 @@ static void set_thread_dispatch_necessary( bool dispatch_necessary )
_Thread_Dispatch_necessary = dispatch_necessary;
+ if ( !dispatch_necessary ) {
+ _Thread_Heir = _Thread_Executing;
+ }
+
#if defined( PREVENT_SMP_ASSERT_FAILURES )
_ISR_Enable_without_giant( level );
#endif