summaryrefslogtreecommitdiffstats
path: root/cpukit/score/inline
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2006-03-07 20:47:53 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2006-03-07 20:47:53 +0000
commitf0ad529d28688214568532c0d30eb13654db1462 (patch)
tree0b254b2a26f754f598edf2b441c2ebd7576666ea /cpukit/score/inline
parentNew. (diff)
downloadrtems-f0ad529d28688214568532c0d30eb13654db1462.tar.bz2
2006-03-07 Joel Sherrill <joel@OARcorp.com>
PR 866/rtems * score/include/rtems/system.h, score/include/rtems/score/isr.h, score/inline/rtems/score/thread.inl, score/macros/rtems/score/thread.inl: Added memory barriers to enter and exit of dispatching and interrupt critical sections so GCC will not optimize and reorder code out of a critical section.
Diffstat (limited to 'cpukit/score/inline')
-rw-r--r--cpukit/score/inline/rtems/score/thread.inl3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpukit/score/inline/rtems/score/thread.inl b/cpukit/score/inline/rtems/score/thread.inl
index 1599883d70..125f7cf5f7 100644
--- a/cpukit/score/inline/rtems/score/thread.inl
+++ b/cpukit/score/inline/rtems/score/thread.inl
@@ -142,6 +142,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_disable_level += 1;
+ RTEMS_COMPILER_MEMORY_BARRIER();
}
/**
@@ -154,6 +155,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
#if ( CPU_INLINE_ENABLE_DISPATCH == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch()
{
+ RTEMS_COMPILER_MEMORY_BARRIER();
if ( (--_Thread_Dispatch_disable_level) == 0 )
_Thread_Dispatch();
}
@@ -171,6 +173,7 @@ void _Thread_Enable_dispatch( void );
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
+ RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
}