Update #2555. Update #2626. --- cpukit/score/include/rtems/score/threaddispatch.h | 28 +++++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/cpukit/score/include/rtems/score/threaddispatch.h b/cpukit/score/include/rtems/score/threaddispatch.h index 4ef5538..bf846e3 100644 --- a/cpukit/score/include/rtems/score/threaddispatch.h +++ b/cpukit/score/include/rtems/score/threaddispatch.h @@ -238,23 +238,23 @@ void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level ); /** * @brief Disables thread dispatching inside a critical section (interrupts - * disabled). + * disabled) with the current processor. * * This function does not acquire the Giant lock. * + * @param[in] cpu_self The current processor. * @param[in] lock_context The lock context of the corresponding * _ISR_lock_ISR_disable() that started the critical section. * * @return The current processor. */ -RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical( +RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_with_CPU( + Per_CPU_Control *cpu_self, const ISR_lock_Context *lock_context ) { - Per_CPU_Control *cpu_self; - uint32_t disable_level; + uint32_t disable_level; - cpu_self = _Per_CPU_Get(); disable_level = cpu_self->thread_dispatch_disable_level; _Profiling_Thread_dispatch_disable_critical( cpu_self, @@ -267,6 +267,24 @@ RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical( } /** + * @brief Disables thread dispatching inside a critical section (interrupts + * disabled). + * + * This function does not acquire the Giant lock. + * + * @param[in] lock_context The lock context of the corresponding + * _ISR_lock_ISR_disable() that started the critical section. + * + * @return The current processor. + */ +RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Dispatch_disable_critical( + const ISR_lock_Context *lock_context +) +{ + return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context ); +} + +/** * @brief Disables thread dispatching. * * This function does not acquire the Giant lock. -- 1.8.4.5 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel