[rtems commit] smp: Protect decrement operation
Sebastian Huber
sebh at rtems.org
Wed Jun 12 14:08:10 UTC 2013
Module: rtems
Branch: master
Commit: df244cfc300029d943a5c54b22d28b85c38d2ae0
Changeset: http://git.rtems.org/rtems/commit/?id=df244cfc300029d943a5c54b22d28b85c38d2ae0
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jun 12 09:16:30 2013 +0200
smp: Protect decrement operation
---
cpukit/score/src/threaddispatchdisablelevel.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cpukit/score/src/threaddispatchdisablelevel.c b/cpukit/score/src/threaddispatchdisablelevel.c
index ee1bfeb..4686795 100644
--- a/cpukit/score/src/threaddispatchdisablelevel.c
+++ b/cpukit/score/src/threaddispatchdisablelevel.c
@@ -88,16 +88,16 @@ uint32_t _Thread_Dispatch_decrement_disable_level( void )
_ISR_Disable_on_this_core( isr_level );
+ disable_level = _Thread_Dispatch_disable_level;
+ --disable_level;
+ _Thread_Dispatch_disable_level = disable_level;
+
--level_lock->nest_level;
if ( level_lock->nest_level == 0 ) {
level_lock->owner_cpu = NO_OWNER_CPU;
_SMP_lock_Release( &level_lock->lock );
}
- disable_level = _Thread_Dispatch_disable_level;
- --disable_level;
- _Thread_Dispatch_disable_level = disable_level;
-
_ISR_Enable_on_this_core( isr_level );
return disable_level;
More information about the vc
mailing list