forked from Imagelibrary/rtems
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -119,23 +119,23 @@ uint32_t _Thread_Dispatch_decrement_disable_level( void )
|
||||
return disable_level;
|
||||
}
|
||||
|
||||
void _Giant_Acquire( void )
|
||||
void _Giant_Acquire( Per_CPU_Control *cpu_self )
|
||||
{
|
||||
ISR_Level isr_level;
|
||||
|
||||
_ISR_Disable_without_giant( isr_level );
|
||||
_Assert( _Thread_Dispatch_disable_level != 0 );
|
||||
_Giant_Do_acquire( _Per_CPU_Get() );
|
||||
_Giant_Do_acquire( cpu_self );
|
||||
_ISR_Enable_without_giant( isr_level );
|
||||
}
|
||||
|
||||
void _Giant_Release( void )
|
||||
void _Giant_Release( Per_CPU_Control *cpu_self )
|
||||
{
|
||||
ISR_Level isr_level;
|
||||
|
||||
_ISR_Disable_without_giant( isr_level );
|
||||
_Assert( _Thread_Dispatch_disable_level != 0 );
|
||||
_Giant_Do_release( _Per_CPU_Get() );
|
||||
_Giant_Do_release( cpu_self );
|
||||
_ISR_Enable_without_giant( isr_level );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user