From 222dc775838c73708054db6283723027c5deb56c Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 26 Feb 2015 10:32:08 +0100 Subject: 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. --- testsuites/tmtests/tm26/task1.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'testsuites/tmtests/tm26/task1.c') 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 -- cgit v1.2.3