From 413b9e286d89bd0ddb70191df27218439170989b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 20 Apr 2015 09:49:39 +0200 Subject: score: Modify _Thread_Dispatch_disable_critical() Return the current processor to be in line with _Thread_Disable_dispatch(). --- cpukit/score/include/rtems/score/threaddispatch.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'cpukit/score/include/rtems/score/threaddispatch.h') diff --git a/cpukit/score/include/rtems/score/threaddispatch.h b/cpukit/score/include/rtems/score/threaddispatch.h index f8c3611674..89f5c0ba5b 100644 --- a/cpukit/score/include/rtems/score/threaddispatch.h +++ b/cpukit/score/include/rtems/score/threaddispatch.h @@ -242,16 +242,19 @@ void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level ); * * This function does not acquire the Giant lock. * - * @param[in] cpu_self The current processor. + * @return The current processor. */ -RTEMS_INLINE_ROUTINE void _Thread_Dispatch_disable_critical( - Per_CPU_Control *cpu_self -) +RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical( void ) { - uint32_t disable_level = cpu_self->thread_dispatch_disable_level; + Per_CPU_Control *cpu_self; + uint32_t disable_level; + cpu_self = _Per_CPU_Get(); + disable_level = cpu_self->thread_dispatch_disable_level; _Profiling_Thread_dispatch_disable( cpu_self, disable_level ); cpu_self->thread_dispatch_disable_level = disable_level + 1; + + return cpu_self; } /** @@ -271,8 +274,7 @@ RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable( void ) _ISR_Disable_without_giant( level ); #endif - cpu_self = _Per_CPU_Get(); - _Thread_Dispatch_disable_critical( cpu_self ); + cpu_self = _Thread_Dispatch_disable_critical(); #if defined( RTEMS_SMP ) || defined( RTEMS_PROFILING ) _ISR_Enable_without_giant( level ); -- cgit v1.2.3