aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-02-20 20:21:37 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-02-20 20:21:37 +0000
commit605d283b6aced9dd69f32b6d6ac0e9f0d25cd10e (patch)
tree9c79569815668dc7b64fbaeca2af7524f714ac76
parentdaabc2b079b17a41ca2f1a2a6423373f811402ba (diff)
downloadChibiOS-605d283b6aced9dd69f32b6d6ac0e9f0d25cd10e.tar.gz
ChibiOS-605d283b6aced9dd69f32b6d6ac0e9f0d25cd10e.tar.bz2
ChibiOS-605d283b6aced9dd69f32b6d6ac0e9f0d25cd10e.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@792 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--demos/Win32-MinGW/chcore.h2
-rw-r--r--ports/ARM7/chcore.h2
-rw-r--r--ports/AVR/chcore.h2
-rw-r--r--ports/MSP430/chcore.h2
-rw-r--r--readme.txt2
-rw-r--r--src/templates/chcore.h2
6 files changed, 7 insertions, 5 deletions
diff --git a/demos/Win32-MinGW/chcore.h b/demos/Win32-MinGW/chcore.h
index 029de3566..97f248a54 100644
--- a/demos/Win32-MinGW/chcore.h
+++ b/demos/Win32-MinGW/chcore.h
@@ -109,7 +109,7 @@ struct context {
/**
* Enforces a correct alignment for a stack area size value.
*/
-#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
+#define STACK_ALIGN(n) ((((n) - 1) | (sizeof(stkalign_t) - 1)) + 1)
/**
* Computes the thread working area global size.
diff --git a/ports/ARM7/chcore.h b/ports/ARM7/chcore.h
index a92ed5512..e2c6481b5 100644
--- a/ports/ARM7/chcore.h
+++ b/ports/ARM7/chcore.h
@@ -128,7 +128,7 @@ struct context {
/**
* Enforces a correct alignment for a stack area size value.
*/
-#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
+#define STACK_ALIGN(n) ((((n) - 1) | (sizeof(stkalign_t) - 1)) + 1)
/**
* Computes the thread working area global size.
diff --git a/ports/AVR/chcore.h b/ports/AVR/chcore.h
index 44f7b3506..187a8463c 100644
--- a/ports/AVR/chcore.h
+++ b/ports/AVR/chcore.h
@@ -153,7 +153,7 @@ struct context {
/**
* Enforces a correct alignment for a stack area size value.
*/
-#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
+#define STACK_ALIGN(n) ((((n) - 1) | (sizeof(stkalign_t) - 1)) + 1)
/**
* Computes the thread working area global size.
diff --git a/ports/MSP430/chcore.h b/ports/MSP430/chcore.h
index 3fc7161cb..c36fdd5c4 100644
--- a/ports/MSP430/chcore.h
+++ b/ports/MSP430/chcore.h
@@ -125,7 +125,7 @@ struct context {
/**
* Enforces a correct alignment for a stack area size value.
*/
-#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
+#define STACK_ALIGN(n) ((((n) - 1) | (sizeof(stkalign_t) - 1)) + 1)
/**
* Computes the thread working area global size.
diff --git a/readme.txt b/readme.txt
index a6e6f0ffd..c3505a8bc 100644
--- a/readme.txt
+++ b/readme.txt
@@ -73,6 +73,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
*****************************************************************************
*** 1.1.1unstable ***
+- FIX: Fixed a problem into the STACK_ALIGN() macro (backported in stable
+ branch).
- FIX: Fixed a problem with a wrong declaration of the PLL structure in the
file lpc214x.h (backported in stable branch).
- FIX: Fixed a problem with some event APIs not showing in the documentation
diff --git a/src/templates/chcore.h b/src/templates/chcore.h
index fa0edd034..78fa3abac 100644
--- a/src/templates/chcore.h
+++ b/src/templates/chcore.h
@@ -96,7 +96,7 @@ struct context {
/**
* Enforces a correct alignment for a stack area size value.
*/
-#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
+#define STACK_ALIGN(n) ((((n) - 1) | (sizeof(stkalign_t) - 1)) + 1)
/**
* Computes the thread working area global size.