summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/percpu.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-28 09:03:58 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-30 09:53:23 +0200
commit99970a7912559c70b85308e5150654693a2f5be9 (patch)
tree586d04a47fd0bd449e72483e1cf8f73c29186713 /cpukit/score/include/rtems/score/percpu.h
parentscore: Add _Assert_Thread_dispatching_repressed() (diff)
downloadrtems-99970a7912559c70b85308e5150654693a2f5be9.tar.bz2
score: Add assert to _Per_CPU_Get()
Thread dispatching must be repressed to use the per CPU control of the current processor consistently.
Diffstat (limited to 'cpukit/score/include/rtems/score/percpu.h')
-rw-r--r--cpukit/score/include/rtems/score/percpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/percpu.h b/cpukit/score/include/rtems/score/percpu.h
index 18bcfb4fc7..e4848fb14f 100644
--- a/cpukit/score/include/rtems/score/percpu.h
+++ b/cpukit/score/include/rtems/score/percpu.h
@@ -22,6 +22,7 @@
#ifdef ASM
#include <rtems/asm.h>
#else
+ #include <rtems/score/assert.h>
#include <rtems/score/isrlevel.h>
#include <rtems/score/timestamp.h>
#include <rtems/score/smplock.h>
@@ -236,6 +237,8 @@ extern Per_CPU_Control _Per_CPU_Information[] CPU_STRUCTURE_ALIGNMENT;
#if defined( RTEMS_SMP )
static inline Per_CPU_Control *_Per_CPU_Get( void )
{
+ _Assert_Thread_dispatching_repressed();
+
return &_Per_CPU_Information[ _SMP_Get_current_processor() ];
}
#else