[rtems commit] score: Force Per_CPU_Control::executing alignment
Sebastian Huber
sebh at rtems.org
Wed Nov 23 06:55:59 UTC 2016
Module: rtems
Branch: master
Commit: a550b3f35a32e6c74c78aeda1154b1d901574168
Changeset: http://git.rtems.org/rtems/commit/?id=a550b3f35a32e6c74c78aeda1154b1d901574168
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Nov 23 07:47:57 2016 +0100
score: Force Per_CPU_Control::executing alignment
This fixes the CPU ports with relaxed alignment restrictions, e.g. type
alignment is less than the type size.
Close #2822.
Close #2823.
---
cpukit/score/include/rtems/score/percpu.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/cpukit/score/include/rtems/score/percpu.h b/cpukit/score/include/rtems/score/percpu.h
index 78196e8..3b63c7c 100644
--- a/cpukit/score/include/rtems/score/percpu.h
+++ b/cpukit/score/include/rtems/score/percpu.h
@@ -334,6 +334,13 @@ typedef struct Per_CPU_Control {
*/
volatile bool dispatch_necessary;
+ /*
+ * Ensure that the executing member is at least 4-byte aligned, see
+ * PER_CPU_OFFSET_EXECUTING. This is necessary on CPU ports with relaxed
+ * alignment restrictions, e.g. type alignment is less than the type size.
+ */
+ bool reserved_for_executing_alignment[ 3 ];
+
/**
* @brief This is the thread executing on this processor.
*
More information about the vc
mailing list