[PATCH 4/4] score: Add assert to _Per_CPU_Get()
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Jul 26 12:48:44 UTC 2013
Thread dispatching must be repressed to use the per CPU control of the
current processor consistently.
---
cpukit/score/include/rtems/score/percpu.h | 3 +++
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 cf35657..f3ff2e7 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
--
1.7.7
More information about the devel
mailing list