forked from Imagelibrary/rtems
score: Rename _ISR_Disable_without_giant()
Rename _ISR_Disable_without_giant() into _ISR_Local_disable(). Rename _ISR_Enable_without_giant() into _ISR_Local_enable(). This is a preparation to remove the Giant lock. Update #2555.
This commit is contained in:
@@ -588,11 +588,11 @@ static inline void ppc_set_decrementer_register(uint32_t dec)
|
|||||||
ISR_Level level; \
|
ISR_Level level; \
|
||||||
uint32_t val; \
|
uint32_t val; \
|
||||||
uint32_t mybits = bits; \
|
uint32_t mybits = bits; \
|
||||||
_ISR_Disable_without_giant(level); \
|
_ISR_Local_disable(level); \
|
||||||
val = PPC_SPECIAL_PURPOSE_REGISTER(spr); \
|
val = PPC_SPECIAL_PURPOSE_REGISTER(spr); \
|
||||||
val |= mybits; \
|
val |= mybits; \
|
||||||
PPC_SET_SPECIAL_PURPOSE_REGISTER(spr, val); \
|
PPC_SET_SPECIAL_PURPOSE_REGISTER(spr, val); \
|
||||||
_ISR_Enable_without_giant(level); \
|
_ISR_Local_enable(level); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -608,12 +608,12 @@ static inline void ppc_set_decrementer_register(uint32_t dec)
|
|||||||
uint32_t val; \
|
uint32_t val; \
|
||||||
uint32_t mybits = bits; \
|
uint32_t mybits = bits; \
|
||||||
uint32_t mymask = mask; \
|
uint32_t mymask = mask; \
|
||||||
_ISR_Disable_without_giant(level); \
|
_ISR_Local_disable(level); \
|
||||||
val = PPC_SPECIAL_PURPOSE_REGISTER(spr); \
|
val = PPC_SPECIAL_PURPOSE_REGISTER(spr); \
|
||||||
val &= ~mymask; \
|
val &= ~mymask; \
|
||||||
val |= mybits; \
|
val |= mybits; \
|
||||||
PPC_SET_SPECIAL_PURPOSE_REGISTER(spr, val); \
|
PPC_SET_SPECIAL_PURPOSE_REGISTER(spr, val); \
|
||||||
_ISR_Enable_without_giant(level); \
|
_ISR_Local_enable(level); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -627,11 +627,11 @@ static inline void ppc_set_decrementer_register(uint32_t dec)
|
|||||||
ISR_Level level; \
|
ISR_Level level; \
|
||||||
uint32_t val; \
|
uint32_t val; \
|
||||||
uint32_t mybits = bits; \
|
uint32_t mybits = bits; \
|
||||||
_ISR_Disable_without_giant(level); \
|
_ISR_Local_disable(level); \
|
||||||
val = PPC_SPECIAL_PURPOSE_REGISTER(spr); \
|
val = PPC_SPECIAL_PURPOSE_REGISTER(spr); \
|
||||||
val &= ~mybits; \
|
val &= ~mybits; \
|
||||||
PPC_SET_SPECIAL_PURPOSE_REGISTER(spr, val); \
|
PPC_SET_SPECIAL_PURPOSE_REGISTER(spr, val); \
|
||||||
_ISR_Enable_without_giant(level); \
|
_ISR_Local_enable(level); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -705,11 +705,11 @@ static inline void ppc_set_decrementer_register(uint32_t dec)
|
|||||||
ISR_Level level; \
|
ISR_Level level; \
|
||||||
uint32_t val; \
|
uint32_t val; \
|
||||||
uint32_t mybits = bits; \
|
uint32_t mybits = bits; \
|
||||||
_ISR_Disable_without_giant(level); \
|
_ISR_Local_disable(level); \
|
||||||
val = PPC_DEVICE_CONTROL_REGISTER(dcr); \
|
val = PPC_DEVICE_CONTROL_REGISTER(dcr); \
|
||||||
val |= mybits; \
|
val |= mybits; \
|
||||||
PPC_SET_DEVICE_CONTROL_REGISTER(dcr, val); \
|
PPC_SET_DEVICE_CONTROL_REGISTER(dcr, val); \
|
||||||
_ISR_Enable_without_giant(level); \
|
_ISR_Local_enable(level); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -725,12 +725,12 @@ static inline void ppc_set_decrementer_register(uint32_t dec)
|
|||||||
uint32_t val; \
|
uint32_t val; \
|
||||||
uint32_t mybits = bits; \
|
uint32_t mybits = bits; \
|
||||||
uint32_t mymask = mask; \
|
uint32_t mymask = mask; \
|
||||||
_ISR_Disable_without_giant(level); \
|
_ISR_Local_disable(level); \
|
||||||
val = PPC_DEVICE_CONTROL_REGISTER(dcr); \
|
val = PPC_DEVICE_CONTROL_REGISTER(dcr); \
|
||||||
val &= ~mymask; \
|
val &= ~mymask; \
|
||||||
val |= mybits; \
|
val |= mybits; \
|
||||||
PPC_SET_DEVICE_CONTROL_REGISTER(dcr, val); \
|
PPC_SET_DEVICE_CONTROL_REGISTER(dcr, val); \
|
||||||
_ISR_Enable_without_giant(level); \
|
_ISR_Local_enable(level); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -744,11 +744,11 @@ static inline void ppc_set_decrementer_register(uint32_t dec)
|
|||||||
ISR_Level level; \
|
ISR_Level level; \
|
||||||
uint32_t val; \
|
uint32_t val; \
|
||||||
uint32_t mybits = bits; \
|
uint32_t mybits = bits; \
|
||||||
_ISR_Disable_without_giant(level); \
|
_ISR_Local_disable(level); \
|
||||||
val = PPC_DEVICE_CONTROL_REGISTER(dcr); \
|
val = PPC_DEVICE_CONTROL_REGISTER(dcr); \
|
||||||
val &= ~mybits; \
|
val &= ~mybits; \
|
||||||
PPC_SET_DEVICE_CONTROL_REGISTER(dcr, val); \
|
PPC_SET_DEVICE_CONTROL_REGISTER(dcr, val); \
|
||||||
_ISR_Enable_without_giant(level); \
|
_ISR_Local_enable(level); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static inline uint32_t ppc_time_base(void)
|
static inline uint32_t ppc_time_base(void)
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ rtems_status_code rtems_interrupt_catch(
|
|||||||
* @see rtems_interrupt_local_enable().
|
* @see rtems_interrupt_local_enable().
|
||||||
*/
|
*/
|
||||||
#define rtems_interrupt_local_disable( _isr_cookie ) \
|
#define rtems_interrupt_local_disable( _isr_cookie ) \
|
||||||
_ISR_Disable_without_giant( _isr_cookie )
|
_ISR_Local_disable( _isr_cookie )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This macro restores the previous interrupt level on the current
|
* @brief This macro restores the previous interrupt level on the current
|
||||||
@@ -149,7 +149,7 @@ rtems_status_code rtems_interrupt_catch(
|
|||||||
* rtems_interrupt_local_disable().
|
* rtems_interrupt_local_disable().
|
||||||
*/
|
*/
|
||||||
#define rtems_interrupt_local_enable( _isr_cookie ) \
|
#define rtems_interrupt_local_enable( _isr_cookie ) \
|
||||||
_ISR_Enable_without_giant( _isr_cookie )
|
_ISR_Local_enable( _isr_cookie )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief RTEMS Interrupt Is in Progress
|
* @brief RTEMS Interrupt Is in Progress
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ static ISR_Level _SPARCV8_Acquire_the_one_lock( void )
|
|||||||
{
|
{
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
|
|
||||||
#if defined(RTEMS_SMP)
|
#if defined(RTEMS_SMP)
|
||||||
do {
|
do {
|
||||||
@@ -65,7 +65,7 @@ static void _SPARCV8_Release_the_one_lock( ISR_Level level )
|
|||||||
#if defined(RTEMS_SMP)
|
#if defined(RTEMS_SMP)
|
||||||
_SPARCV8_The_one_lock = 0;
|
_SPARCV8_The_one_lock = 0;
|
||||||
#endif
|
#endif
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t __atomic_exchange_1( uint8_t *mem, uint8_t val, int model )
|
uint8_t __atomic_exchange_1( uint8_t *mem, uint8_t val, int model )
|
||||||
|
|||||||
@@ -136,13 +136,13 @@ typedef uint32_t ISR_Level;
|
|||||||
RTEMS_COMPILER_MEMORY_BARRIER(); \
|
RTEMS_COMPILER_MEMORY_BARRIER(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define _ISR_Disable_without_giant( _level ) \
|
#define _ISR_Local_disable( _level ) \
|
||||||
do { \
|
do { \
|
||||||
_CPU_ISR_Disable( _level ); \
|
_CPU_ISR_Disable( _level ); \
|
||||||
RTEMS_COMPILER_MEMORY_BARRIER(); \
|
RTEMS_COMPILER_MEMORY_BARRIER(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define _ISR_Enable_without_giant( _level ) \
|
#define _ISR_Local_enable( _level ) \
|
||||||
do { \
|
do { \
|
||||||
RTEMS_COMPILER_MEMORY_BARRIER(); \
|
RTEMS_COMPILER_MEMORY_BARRIER(); \
|
||||||
_CPU_ISR_Enable( _level ); \
|
_CPU_ISR_Enable( _level ); \
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ typedef struct {
|
|||||||
#if defined( RTEMS_SMP )
|
#if defined( RTEMS_SMP )
|
||||||
#define _ISR_lock_ISR_disable( _context ) \
|
#define _ISR_lock_ISR_disable( _context ) \
|
||||||
do { \
|
do { \
|
||||||
_ISR_Disable_without_giant( ( _context )->Lock_context.isr_level ); \
|
_ISR_Local_disable( ( _context )->Lock_context.isr_level ); \
|
||||||
_ISR_lock_ISR_disable_profile( _context ) \
|
_ISR_lock_ISR_disable_profile( _context ) \
|
||||||
} while ( 0 )
|
} while ( 0 )
|
||||||
#else
|
#else
|
||||||
@@ -374,7 +374,7 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
#if defined( RTEMS_SMP )
|
#if defined( RTEMS_SMP )
|
||||||
#define _ISR_lock_ISR_enable( _context ) \
|
#define _ISR_lock_ISR_enable( _context ) \
|
||||||
_ISR_Enable_without_giant( ( _context )->Lock_context.isr_level )
|
_ISR_Local_enable( ( _context )->Lock_context.isr_level )
|
||||||
#else
|
#else
|
||||||
#define _ISR_lock_ISR_enable( _context ) \
|
#define _ISR_lock_ISR_enable( _context ) \
|
||||||
_ISR_Enable( ( _context )->isr_level )
|
_ISR_Enable( ( _context )->isr_level )
|
||||||
|
|||||||
@@ -251,9 +251,9 @@ RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Wait_for_ownership(
|
|||||||
if ( timeout > 0 ) {
|
if ( timeout > 0 ) {
|
||||||
_Watchdog_Preinitialize( &rival.Watchdog, cpu_self );
|
_Watchdog_Preinitialize( &rival.Watchdog, cpu_self );
|
||||||
_Watchdog_Initialize( &rival.Watchdog, _MRSP_Timeout );
|
_Watchdog_Initialize( &rival.Watchdog, _MRSP_Timeout );
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
_Watchdog_Per_CPU_insert_relative( &rival.Watchdog, cpu_self, timeout );
|
_Watchdog_Per_CPU_insert_relative( &rival.Watchdog, cpu_self, timeout );
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
}
|
}
|
||||||
|
|
||||||
life_state = _Thread_Set_life_protection( THREAD_LIFE_PROTECTED );
|
life_state = _Thread_Set_life_protection( THREAD_LIFE_PROTECTED );
|
||||||
@@ -269,13 +269,13 @@ RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Wait_for_ownership(
|
|||||||
_Thread_Set_life_protection( life_state );
|
_Thread_Set_life_protection( life_state );
|
||||||
|
|
||||||
if ( timeout > 0 ) {
|
if ( timeout > 0 ) {
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
_Watchdog_Per_CPU_remove(
|
_Watchdog_Per_CPU_remove(
|
||||||
&rival.Watchdog,
|
&rival.Watchdog,
|
||||||
cpu_self,
|
cpu_self,
|
||||||
&cpu_self->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ]
|
&cpu_self->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ]
|
||||||
);
|
);
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
|
|
||||||
if ( status == MRSP_TIMEOUT ) {
|
if ( status == MRSP_TIMEOUT ) {
|
||||||
_MRSP_Restore_priority( executing, initial_priority );
|
_MRSP_Restore_priority( executing, initial_priority );
|
||||||
|
|||||||
@@ -493,7 +493,7 @@ extern Per_CPU_Control_envelope _Per_CPU_Information[] CPU_STRUCTURE_ALIGNMENT;
|
|||||||
#if defined( RTEMS_SMP )
|
#if defined( RTEMS_SMP )
|
||||||
#define _Per_CPU_ISR_disable_and_acquire( cpu, isr_cookie ) \
|
#define _Per_CPU_ISR_disable_and_acquire( cpu, isr_cookie ) \
|
||||||
do { \
|
do { \
|
||||||
_ISR_Disable_without_giant( isr_cookie ); \
|
_ISR_Local_disable( isr_cookie ); \
|
||||||
_Per_CPU_Acquire( cpu ); \
|
_Per_CPU_Acquire( cpu ); \
|
||||||
} while ( 0 )
|
} while ( 0 )
|
||||||
#else
|
#else
|
||||||
@@ -508,7 +508,7 @@ extern Per_CPU_Control_envelope _Per_CPU_Information[] CPU_STRUCTURE_ALIGNMENT;
|
|||||||
#define _Per_CPU_Release_and_ISR_enable( cpu, isr_cookie ) \
|
#define _Per_CPU_Release_and_ISR_enable( cpu, isr_cookie ) \
|
||||||
do { \
|
do { \
|
||||||
_Per_CPU_Release( cpu ); \
|
_Per_CPU_Release( cpu ); \
|
||||||
_ISR_Enable_without_giant( isr_cookie ); \
|
_ISR_Local_enable( isr_cookie ); \
|
||||||
} while ( 0 )
|
} while ( 0 )
|
||||||
#else
|
#else
|
||||||
#define _Per_CPU_Release_and_ISR_enable( cpu, isr_cookie ) \
|
#define _Per_CPU_Release_and_ISR_enable( cpu, isr_cookie ) \
|
||||||
@@ -523,7 +523,7 @@ extern Per_CPU_Control_envelope _Per_CPU_Information[] CPU_STRUCTURE_ALIGNMENT;
|
|||||||
do { \
|
do { \
|
||||||
uint32_t ncpus = _SMP_Get_processor_count(); \
|
uint32_t ncpus = _SMP_Get_processor_count(); \
|
||||||
uint32_t cpu; \
|
uint32_t cpu; \
|
||||||
_ISR_Disable_without_giant( isr_cookie ); \
|
_ISR_Local_disable( isr_cookie ); \
|
||||||
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) { \
|
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) { \
|
||||||
_Per_CPU_Acquire( _Per_CPU_Get_by_index( cpu ) ); \
|
_Per_CPU_Acquire( _Per_CPU_Get_by_index( cpu ) ); \
|
||||||
} \
|
} \
|
||||||
@@ -541,7 +541,7 @@ extern Per_CPU_Control_envelope _Per_CPU_Information[] CPU_STRUCTURE_ALIGNMENT;
|
|||||||
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) { \
|
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) { \
|
||||||
_Per_CPU_Release( _Per_CPU_Get_by_index( cpu ) ); \
|
_Per_CPU_Release( _Per_CPU_Get_by_index( cpu ) ); \
|
||||||
} \
|
} \
|
||||||
_ISR_Enable_without_giant( isr_cookie ); \
|
_ISR_Local_enable( isr_cookie ); \
|
||||||
} while ( 0 )
|
} while ( 0 )
|
||||||
#else
|
#else
|
||||||
#define _Per_CPU_Release_all( isr_cookie ) \
|
#define _Per_CPU_Release_all( isr_cookie ) \
|
||||||
@@ -709,13 +709,13 @@ RTEMS_INLINE_ROUTINE struct _Thread_Control *_Thread_Get_executing( void )
|
|||||||
#if defined( RTEMS_SMP )
|
#if defined( RTEMS_SMP )
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
executing = _Thread_Executing;
|
executing = _Thread_Executing;
|
||||||
|
|
||||||
#if defined( RTEMS_SMP )
|
#if defined( RTEMS_SMP )
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return executing;
|
return executing;
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ static inline void _SMP_lock_ISR_disable_and_acquire(
|
|||||||
SMP_lock_Context *context
|
SMP_lock_Context *context
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_ISR_Disable_without_giant( context->isr_level );
|
_ISR_Local_disable( context->isr_level );
|
||||||
_SMP_lock_Acquire( lock, context );
|
_SMP_lock_Acquire( lock, context );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ static inline void _SMP_lock_Release_and_ISR_enable(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
_SMP_lock_Release( lock, context );
|
_SMP_lock_Release( lock, context );
|
||||||
_ISR_Enable_without_giant( context->isr_level );
|
_ISR_Local_enable( context->isr_level );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -54,13 +54,13 @@ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_is_enabled(void)
|
|||||||
#if defined(RTEMS_SMP)
|
#if defined(RTEMS_SMP)
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enabled = _Thread_Dispatch_disable_level == 0;
|
enabled = _Thread_Dispatch_disable_level == 0;
|
||||||
|
|
||||||
#if defined(RTEMS_SMP)
|
#if defined(RTEMS_SMP)
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return enabled;
|
return enabled;
|
||||||
@@ -325,7 +325,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_enable( Per_CPU_Control *cpu_self )
|
|||||||
if ( disable_level == 1 ) {
|
if ( disable_level == 1 ) {
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
|
|
||||||
if ( cpu_self->dispatch_necessary ) {
|
if ( cpu_self->dispatch_necessary ) {
|
||||||
_Thread_Do_dispatch( cpu_self, level );
|
_Thread_Do_dispatch( cpu_self, level );
|
||||||
@@ -334,7 +334,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_enable( Per_CPU_Control *cpu_self )
|
|||||||
_Profiling_Thread_dispatch_enable( cpu_self, 0 );
|
_Profiling_Thread_dispatch_enable( cpu_self, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
} else {
|
} else {
|
||||||
cpu_self->thread_dispatch_disable_level = disable_level - 1;
|
cpu_self->thread_dispatch_disable_level = disable_level - 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1381,7 +1381,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Wait_flags_try_change(
|
|||||||
#if !defined(RTEMS_SMP)
|
#if !defined(RTEMS_SMP)
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
success = _Thread_Wait_flags_try_change_critical(
|
success = _Thread_Wait_flags_try_change_critical(
|
||||||
@@ -1391,7 +1391,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Wait_flags_try_change(
|
|||||||
);
|
);
|
||||||
|
|
||||||
#if !defined(RTEMS_SMP)
|
#if !defined(RTEMS_SMP)
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
|||||||
@@ -26,10 +26,10 @@
|
|||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
Per_CPU_Control *cpu_self;
|
Per_CPU_Control *cpu_self;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
cpu_self = _Per_CPU_Get_snapshot();
|
cpu_self = _Per_CPU_Get_snapshot();
|
||||||
dispatch_allowed = cpu_self->thread_dispatch_disable_level == 0;
|
dispatch_allowed = cpu_self->thread_dispatch_disable_level == 0;
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
|
|
||||||
return dispatch_allowed;
|
return dispatch_allowed;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void _Terminate(
|
|||||||
{
|
{
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
(void) level;
|
(void) level;
|
||||||
|
|
||||||
_SMP_Request_shutdown();
|
_SMP_Request_shutdown();
|
||||||
|
|||||||
@@ -36,13 +36,13 @@ bool _ISR_Is_in_progress( void )
|
|||||||
#if defined( RTEMS_SMP )
|
#if defined( RTEMS_SMP )
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
isr_nest_level = _ISR_Nest_level;
|
isr_nest_level = _ISR_Nest_level;
|
||||||
|
|
||||||
#if defined( RTEMS_SMP )
|
#if defined( RTEMS_SMP )
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return isr_nest_level != 0;
|
return isr_nest_level != 0;
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ void _SMP_lock_Release_and_ISR_enable(
|
|||||||
lock->owner = SMP_LOCK_NO_OWNER;
|
lock->owner = SMP_LOCK_NO_OWNER;
|
||||||
#endif
|
#endif
|
||||||
_SMP_lock_Release_body( lock, context );
|
_SMP_lock_Release_body( lock, context );
|
||||||
_ISR_Enable_without_giant( context->isr_level );
|
_ISR_Local_enable( context->isr_level );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(RTEMS_DEBUG)
|
#if defined(RTEMS_DEBUG)
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ _SMP_Multicast_actions_try_process( void )
|
|||||||
Per_CPU_Control *cpu_self;
|
Per_CPU_Control *cpu_self;
|
||||||
ISR_Level isr_level;
|
ISR_Level isr_level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( isr_level );
|
_ISR_Local_disable( isr_level );
|
||||||
|
|
||||||
cpu_self = _Per_CPU_Get();
|
cpu_self = _Per_CPU_Get();
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ _SMP_Multicast_actions_try_process( void )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_ISR_Enable_without_giant( isr_level );
|
_ISR_Local_enable( isr_level );
|
||||||
}
|
}
|
||||||
|
|
||||||
void _SMP_Multicast_action(
|
void _SMP_Multicast_action(
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ post_switch:
|
|||||||
cpu_self->thread_dispatch_disable_level = 0;
|
cpu_self->thread_dispatch_disable_level = 0;
|
||||||
_Profiling_Thread_dispatch_enable( cpu_self, 0 );
|
_Profiling_Thread_dispatch_enable( cpu_self, 0 );
|
||||||
|
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
|
|
||||||
_Thread_Run_post_switch_actions( executing );
|
_Thread_Run_post_switch_actions( executing );
|
||||||
}
|
}
|
||||||
@@ -147,7 +147,7 @@ void _Thread_Dispatch( void )
|
|||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
Per_CPU_Control *cpu_self;
|
Per_CPU_Control *cpu_self;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
|
|
||||||
cpu_self = _Per_CPU_Get();
|
cpu_self = _Per_CPU_Get();
|
||||||
|
|
||||||
@@ -156,6 +156,6 @@ void _Thread_Dispatch( void )
|
|||||||
cpu_self->thread_dispatch_disable_level = 1;
|
cpu_self->thread_dispatch_disable_level = 1;
|
||||||
_Thread_Do_dispatch( cpu_self, level );
|
_Thread_Do_dispatch( cpu_self, level );
|
||||||
} else {
|
} else {
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ uint32_t _Thread_Dispatch_increment_disable_level( void )
|
|||||||
uint32_t disable_level;
|
uint32_t disable_level;
|
||||||
Per_CPU_Control *cpu_self;
|
Per_CPU_Control *cpu_self;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( isr_level );
|
_ISR_Local_disable( isr_level );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We must obtain the processor after interrupts are disabled to prevent
|
* We must obtain the processor after interrupts are disabled to prevent
|
||||||
@@ -92,7 +92,7 @@ uint32_t _Thread_Dispatch_increment_disable_level( void )
|
|||||||
++disable_level;
|
++disable_level;
|
||||||
cpu_self->thread_dispatch_disable_level = disable_level;
|
cpu_self->thread_dispatch_disable_level = disable_level;
|
||||||
|
|
||||||
_ISR_Enable_without_giant( isr_level );
|
_ISR_Local_enable( isr_level );
|
||||||
|
|
||||||
return disable_level;
|
return disable_level;
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@ uint32_t _Thread_Dispatch_decrement_disable_level( void )
|
|||||||
uint32_t disable_level;
|
uint32_t disable_level;
|
||||||
Per_CPU_Control *cpu_self;
|
Per_CPU_Control *cpu_self;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( isr_level );
|
_ISR_Local_disable( isr_level );
|
||||||
|
|
||||||
cpu_self = _Per_CPU_Get();
|
cpu_self = _Per_CPU_Get();
|
||||||
disable_level = cpu_self->thread_dispatch_disable_level;
|
disable_level = cpu_self->thread_dispatch_disable_level;
|
||||||
@@ -114,7 +114,7 @@ uint32_t _Thread_Dispatch_decrement_disable_level( void )
|
|||||||
_Giant_Do_release( cpu_self );
|
_Giant_Do_release( cpu_self );
|
||||||
|
|
||||||
_Profiling_Thread_dispatch_enable( cpu_self, disable_level );
|
_Profiling_Thread_dispatch_enable( cpu_self, disable_level );
|
||||||
_ISR_Enable_without_giant( isr_level );
|
_ISR_Local_enable( isr_level );
|
||||||
|
|
||||||
return disable_level;
|
return disable_level;
|
||||||
}
|
}
|
||||||
@@ -123,20 +123,20 @@ void _Giant_Acquire( Per_CPU_Control *cpu_self )
|
|||||||
{
|
{
|
||||||
ISR_Level isr_level;
|
ISR_Level isr_level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( isr_level );
|
_ISR_Local_disable( isr_level );
|
||||||
_Assert( _Thread_Dispatch_disable_level != 0 );
|
_Assert( _Thread_Dispatch_disable_level != 0 );
|
||||||
_Giant_Do_acquire( cpu_self );
|
_Giant_Do_acquire( cpu_self );
|
||||||
_ISR_Enable_without_giant( isr_level );
|
_ISR_Local_enable( isr_level );
|
||||||
}
|
}
|
||||||
|
|
||||||
void _Giant_Release( Per_CPU_Control *cpu_self )
|
void _Giant_Release( Per_CPU_Control *cpu_self )
|
||||||
{
|
{
|
||||||
ISR_Level isr_level;
|
ISR_Level isr_level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( isr_level );
|
_ISR_Local_disable( isr_level );
|
||||||
_Assert( _Thread_Dispatch_disable_level != 0 );
|
_Assert( _Thread_Dispatch_disable_level != 0 );
|
||||||
_Giant_Do_release( cpu_self );
|
_Giant_Do_release( cpu_self );
|
||||||
_ISR_Enable_without_giant( isr_level );
|
_ISR_Local_enable( isr_level );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined( RTEMS_DEBUG )
|
#if defined( RTEMS_DEBUG )
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ void _Thread_Handler( void )
|
|||||||
* Do not use the level of the thread control block, since it has a
|
* Do not use the level of the thread control block, since it has a
|
||||||
* different format.
|
* different format.
|
||||||
*/
|
*/
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* At this point, the dispatch disable level BETTER be 1.
|
* At this point, the dispatch disable level BETTER be 1.
|
||||||
|
|||||||
@@ -158,11 +158,11 @@ static void call_tests_isr_disabled( size_t set_size,
|
|||||||
for (i = 0; i < RTEMS_ARRAY_SIZE( test_cases ); ++i) {
|
for (i = 0; i < RTEMS_ARRAY_SIZE( test_cases ); ++i) {
|
||||||
ISR_Level isr_level;
|
ISR_Level isr_level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( isr_level );
|
_ISR_Local_disable( isr_level );
|
||||||
|
|
||||||
call_test( set_size, cpu_set, bs, i );
|
call_test( set_size, cpu_set, bs, i );
|
||||||
|
|
||||||
_ISR_Enable_without_giant( isr_level );
|
_ISR_Local_enable( isr_level );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ static void get_obtain_delay_estimate(test_context *ctx)
|
|||||||
|
|
||||||
_SMP_lock_Initialize(&lock, "test");
|
_SMP_lock_Initialize(&lock, "test");
|
||||||
|
|
||||||
_ISR_Disable_without_giant(level);
|
_ISR_Local_disable(level);
|
||||||
|
|
||||||
for (i = 0; i < n; ++i) {
|
for (i = 0; i < n; ++i) {
|
||||||
SMP_lock_Context lock_context;
|
SMP_lock_Context lock_context;
|
||||||
@@ -240,7 +240,7 @@ static void get_obtain_delay_estimate(test_context *ctx)
|
|||||||
t[i] = rtems_counter_difference(b, a);
|
t[i] = rtems_counter_difference(b, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
_ISR_Enable_without_giant(level);
|
_ISR_Local_enable(level);
|
||||||
|
|
||||||
_SMP_lock_Destroy(&lock);
|
_SMP_lock_Destroy(&lock);
|
||||||
|
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ static void delay_ipi_task(rtems_task_argument variant)
|
|||||||
test_context *ctx = &test_instance;
|
test_context *ctx = &test_instance;
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant(level);
|
_ISR_Local_disable(level);
|
||||||
|
|
||||||
/* (C) */
|
/* (C) */
|
||||||
barrier(ctx, &ctx->worker_barrier_state);
|
barrier(ctx, &ctx->worker_barrier_state);
|
||||||
@@ -215,7 +215,7 @@ static void delay_ipi_task(rtems_task_argument variant)
|
|||||||
_Thread_Dispatch_disable();
|
_Thread_Dispatch_disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
_ISR_Enable_without_giant(level);
|
_ISR_Local_enable(level);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We get deleted as a side effect of enabling the thread life protection or
|
* We get deleted as a side effect of enabling the thread life protection or
|
||||||
@@ -267,7 +267,7 @@ static void delay_switch_task(rtems_task_argument arg)
|
|||||||
rtems_status_code sc;
|
rtems_status_code sc;
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant(level);
|
_ISR_Local_disable(level);
|
||||||
(void) level;
|
(void) level;
|
||||||
|
|
||||||
ctx->delay_switch_for_executing = _Thread_Get_executing();
|
ctx->delay_switch_for_executing = _Thread_Get_executing();
|
||||||
@@ -403,7 +403,7 @@ static void op_worker_task(rtems_task_argument arg)
|
|||||||
test_op op = arg;
|
test_op op = arg;
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant(level);
|
_ISR_Local_disable(level);
|
||||||
(void) level;
|
(void) level;
|
||||||
|
|
||||||
/* (E) */
|
/* (E) */
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ static void set_thread_dispatch_necessary( bool dispatch_necessary )
|
|||||||
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_Thread_Dispatch_necessary = dispatch_necessary;
|
_Thread_Dispatch_necessary = dispatch_necessary;
|
||||||
@@ -104,7 +104,7 @@ static void set_thread_dispatch_necessary( bool dispatch_necessary )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,13 +113,13 @@ static void set_thread_heir( Thread_Control *thread )
|
|||||||
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_Thread_Heir = thread;
|
_Thread_Heir = thread;
|
||||||
|
|
||||||
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,13 +128,13 @@ static void set_thread_executing( Thread_Control *thread )
|
|||||||
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
_ISR_Disable_without_giant( level );
|
_ISR_Local_disable( level );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_Thread_Executing = thread;
|
_Thread_Executing = thread;
|
||||||
|
|
||||||
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
#if defined( PREVENT_SMP_ASSERT_FAILURES )
|
||||||
_ISR_Enable_without_giant( level );
|
_ISR_Local_enable( level );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ rtems_task Task_1(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(RTEMS_SMP)
|
#if defined(RTEMS_SMP)
|
||||||
_ISR_Disable_without_giant(level);
|
_ISR_Local_disable(level);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_Thread_Executing =
|
_Thread_Executing =
|
||||||
@@ -197,7 +197,7 @@ rtems_task Task_1(
|
|||||||
_Thread_Dispatch_necessary = 1;
|
_Thread_Dispatch_necessary = 1;
|
||||||
|
|
||||||
#if defined(RTEMS_SMP)
|
#if defined(RTEMS_SMP)
|
||||||
_ISR_Enable_without_giant(level);
|
_ISR_Local_enable(level);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Interrupt_occurred = 0;
|
Interrupt_occurred = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user