[RTEMS Project] #3497: Remove superfluous interrupt enable in _Thread_Dispatch_enable() (cloned)
RTEMS trac
trac at rtems.org
Fri Aug 10 05:09:03 UTC 2018
#3497: Remove superfluous interrupt enable in _Thread_Dispatch_enable() (cloned)
------------------------------+-----------------------------
Reporter: Sebastian Huber | Owner: Sebastian Huber
Type: defect | Status: assigned
Priority: normal | Milestone: 4.11.3
Component: admin | Version: 4.11
Severity: normal | Keywords:
Blocked By: 3496 | Blocking:
------------------------------+-----------------------------
Cloned from #3496:
----
The _Thread_Dispatch_enable() contains a superfluous interrupt enable.
This bug had probably no effect since the interrupt enable is idempotent
on all CPU ports.
{{{
RTEMS_INLINE_ROUTINE void _Thread_Dispatch_enable( Per_CPU_Control
*cpu_self )
{
uint32_t disable_level = cpu_self->thread_dispatch_disable_level;
if ( disable_level == 1 ) {
ISR_Level level;
_ISR_Local_disable( level );
if (
cpu_self->dispatch_necessary
#if defined(RTEMS_SCORE_ROBUST_THREAD_DISPATCH)
|| !_ISR_Is_enabled( level )
#endif
) {
_Thread_Do_dispatch( cpu_self, level ); <-- This function enabled
interrupts
} else {
cpu_self->thread_dispatch_disable_level = 0;
_Profiling_Thread_dispatch_enable( cpu_self, 0 );
}
_ISR_Local_enable( level ); <-- Here we enable it again
} else {
_Assert( disable_level > 0 );
cpu_self->thread_dispatch_disable_level = disable_level - 1;
}
}
}}}
--
Ticket URL: <http://devel.rtems.org/ticket/3497>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list