From d5e073cde70211b2471e4366be397370e9f6ce48 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 11 Nov 2016 14:37:51 +0100 Subject: score: Allow interrupts during thread dispatch Use a processor-specific interrupt frame during context switches in case the executing thread is longer executes on the processor and the heir thread is about to start execution. During this period we must not use a thread stack for interrupt processing. Update #2809. --- cpukit/score/src/threaddispatch.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'cpukit/score/src/threaddispatch.c') diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c index c96299cb59..f2c24905dc 100644 --- a/cpukit/score/src/threaddispatch.c +++ b/cpukit/score/src/threaddispatch.c @@ -174,14 +174,7 @@ void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level ) if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = rtems_configuration_get_ticks_per_timeslice(); - /* - * On SMP the complete context switch must be atomic with respect to one - * processor. See also _Thread_Handler() since _Context_switch() may branch - * to this function. - */ -#if !defined( RTEMS_SMP ) _ISR_Local_enable( level ); -#endif _User_extensions_Thread_switch( executing, heir ); _Thread_Save_fp( executing ); @@ -195,16 +188,8 @@ void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level ) */ cpu_self = _Per_CPU_Get(); -#if !defined( RTEMS_SMP ) _ISR_Local_disable( level ); -#endif - } while ( -#if defined( RTEMS_SMP ) - false -#else - cpu_self->dispatch_necessary -#endif - ); + } while ( cpu_self->dispatch_necessary ); post_switch: _Assert( cpu_self->thread_dispatch_disable_level == 1 ); -- cgit v1.2.3