diff options
author | Christian Mauderer <Christian.Mauderer@embedded-brains.de> | 2016-12-12 15:03:35 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-12-12 15:51:05 +0100 |
commit | fe7012a0d1d71af20ae36d69c5bd6c31159457d9 (patch) | |
tree | 395cd29694ef3c3f2afdbcc5ac5c413b4437f433 /cpukit/score/include/rtems/score | |
parent | libblock: Fix for RTEMS_DEBUG (diff) | |
download | rtems-fe7012a0d1d71af20ae36d69c5bd6c31159457d9.tar.bz2 |
score: Prevent thread_dispatch_disable_level < 0.
Diffstat (limited to 'cpukit/score/include/rtems/score')
-rw-r--r-- | cpukit/score/include/rtems/score/threaddispatch.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/threaddispatch.h b/cpukit/score/include/rtems/score/threaddispatch.h index 0238f8f5d5..63eb4c6fb4 100644 --- a/cpukit/score/include/rtems/score/threaddispatch.h +++ b/cpukit/score/include/rtems/score/threaddispatch.h @@ -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; } |