From 2b7fe35688fbeb3450ca79b7c5907811433e4fa9 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 26 Feb 2015 10:29:02 +0100 Subject: score: Add parameter to Giant acquire/release Update #2273. --- cpukit/score/include/rtems/score/threaddispatch.h | 18 +++++++++++++----- cpukit/score/include/rtems/score/threadimpl.h | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'cpukit/score/include') diff --git a/cpukit/score/include/rtems/score/threaddispatch.h b/cpukit/score/include/rtems/score/threaddispatch.h index f814072529..170067534a 100644 --- a/cpukit/score/include/rtems/score/threaddispatch.h +++ b/cpukit/score/include/rtems/score/threaddispatch.h @@ -97,17 +97,25 @@ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) * This lock is implicitly acquired in * _Thread_Dispatch_increment_disable_level(). * - * Thread dispatching must be disabled before this lock can be acquired. + * Thread dispatching must be disabled before the Giant lock can be acquired + * and must no be enabled while owning the Giant lock. The thread dispatch + * disable level is not altered by this function. + * + * @param[in] cpu_self The current processor. */ - void _Giant_Acquire( void ); + void _Giant_Acquire( Per_CPU_Control *cpu_self ); /** * @brief Releases the giant lock. * * This lock is implicitly released in * _Thread_Dispatch_decrement_disable_level(). + * + * The thread dispatch disable level is not altered by this function. + * + * @param[in] cpu_self The current processor. */ - void _Giant_Release( void ); + void _Giant_Release( Per_CPU_Control *cpu_self ); /** * @brief Releases the giant lock completely if held by the executing processor. @@ -116,9 +124,9 @@ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) * * The only use case for this operation is in _SMP_Request_shutdown(). * - * @param[in] self_cpu The current processor. + * @param[in] cpu_self The current processor. */ - void _Giant_Drop( Per_CPU_Control *self_cpu ); + void _Giant_Drop( Per_CPU_Control *cpu_self ); /** * @brief Increments the thread dispatch level. diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 353093ce3a..07c5b2f12a 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -558,7 +558,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( Thread_Control *executing ) #if defined(RTEMS_SMP) ISR_Level level; - _Giant_Release(); + _Giant_Release( _Per_CPU_Get() ); _ISR_Disable_without_giant( level ); ( void ) level; -- cgit v1.2.3