mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 04:29:11 +08:00
score: Prevent thread_dispatch_disable_level < 0.
This commit is contained in:
committed by
Sebastian Huber
parent
c69d6aa265
commit
fe7012a0d1
@@ -232,6 +232,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_enable( Per_CPU_Control *cpu_self )
|
||||
|
||||
_ISR_Local_enable( level );
|
||||
} else {
|
||||
_Assert( disable_level > 0 );
|
||||
cpu_self->thread_dispatch_disable_level = disable_level - 1;
|
||||
}
|
||||
}
|
||||
@@ -243,6 +244,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_enable( Per_CPU_Control *cpu_self )
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _Thread_Dispatch_unnest( Per_CPU_Control *cpu_self )
|
||||
{
|
||||
_Assert( cpu_self->thread_dispatch_disable_level > 0 );
|
||||
--cpu_self->thread_dispatch_disable_level;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user