[rtems commit] score: Fix assert

Sebastian Huber sebh at rtems.org
Tue May 19 09:38:16 UTC 2015


Module:    rtems
Branch:    master
Commit:    7e19330e3075d79dbce5d8c126377d64c5301f85
Changeset: http://git.rtems.org/rtems/commit/?id=7e19330e3075d79dbce5d8c126377d64c5301f85

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue May 19 11:37:26 2015 +0200

score: Fix assert

---

 cpukit/score/src/threaddispatchdisablelevel.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cpukit/score/src/threaddispatchdisablelevel.c b/cpukit/score/src/threaddispatchdisablelevel.c
index f78eb52..9170f2e 100644
--- a/cpukit/score/src/threaddispatchdisablelevel.c
+++ b/cpukit/score/src/threaddispatchdisablelevel.c
@@ -113,8 +113,10 @@ uint32_t _Thread_Dispatch_decrement_disable_level( void )
 
   _Giant_Do_release( cpu_self );
   _Assert(
-    ( disable_level == 0 && _Giant.owner_cpu != cpu_self )
-      || ( disable_level != 0 && _Giant.owner_cpu == cpu_self )
+    ( disable_level == cpu_self->isr_nest_level
+      && _Giant.owner_cpu != cpu_self )
+    || ( disable_level > cpu_self->isr_nest_level
+      && _Giant.owner_cpu == cpu_self )
   );
 
   _Profiling_Thread_dispatch_enable( cpu_self, disable_level );




More information about the vc mailing list