From 605d283b6aced9dd69f32b6d6ac0e9f0d25cd10e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 20 Feb 2009 20:21:37 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@792 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/Win32-MinGW/chcore.h | 2 +- ports/ARM7/chcore.h | 2 +- ports/AVR/chcore.h | 2 +- ports/MSP430/chcore.h | 2 +- readme.txt | 2 ++ src/templates/chcore.h | 2 +- 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.