From ca4419762eaab74d52e07e02defbaac42570fea3 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 28 Dec 2008 11:17:09 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@546 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- ports/ARM7/chcore.h | 3 --- ports/ARMCM3/chcore.h | 4 +--- ports/AVR/chcore.h | 3 --- ports/MSP430/chcore.h | 3 --- 4 files changed, 1 insertion(+), 12 deletions(-) (limited to 'ports') diff --git a/ports/ARM7/chcore.h b/ports/ARM7/chcore.h index 470b9de26..1c90eff99 100644 --- a/ports/ARM7/chcore.h +++ b/ports/ARM7/chcore.h @@ -126,17 +126,14 @@ extern "C" { #endif /* !THUMB */ #define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1) -#define StackAlign(n) STACK_ALIGN(n) #define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \ sizeof(struct intctx) + \ sizeof(struct extctx) + \ (n) + \ INT_REQUIRED_STACK) -#define UserStackSize(n) THD_WA_SIZE(n) #define WORKING_AREA(s, n) stkalign_t s[THD_WA_SIZE(n) / sizeof(stkalign_t)]; -#define WorkingArea(s, n) WORKING_AREA(s, n) #ifdef THUMB #define chSysSwitchI chSysSwitchI_thumb diff --git a/ports/ARMCM3/chcore.h b/ports/ARMCM3/chcore.h index c11b948eb..30679e495 100644 --- a/ports/ARMCM3/chcore.h +++ b/ports/ARMCM3/chcore.h @@ -124,20 +124,18 @@ typedef struct { * Enforces a 32 bit alignment for a stack area size value. */ #define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1) -#define StackAlign(n) STACK_ALIGN(n) #define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \ sizeof(struct intctx) + \ sizeof(struct extctx) + \ (n) + \ INT_REQUIRED_STACK) -#define UserStackSize(n) THD_WA_SIZE(n) #define WORKING_AREA(s, n) stkalign_t s[THD_WA_SIZE(n) / sizeof(stkalign_t)]; -#define WorkingArea(s, n) WORKING_AREA(s, n) /* called on each interrupt entry, currently nothing is done */ #define chSysIRQEnterI() + /* called on each interrupt exit, pends a supervisor handler for * execution after all higher priority interrupts; PendSVVector() */ #define chSysIRQExitI() { \ diff --git a/ports/AVR/chcore.h b/ports/AVR/chcore.h index 421c9028f..210b4c366 100644 --- a/ports/AVR/chcore.h +++ b/ports/AVR/chcore.h @@ -107,17 +107,14 @@ typedef struct { #define INT_REQUIRED_STACK 8 #define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1) -#define StackAlign(n) STACK_ALIGN(n) #define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \ (sizeof(struct intctx) - 1) + \ (sizeof(struct extctx) - 1) + \ (n) + \ INT_REQUIRED_STACK) -#define UserStackSize(n) THD_WA_SIZE(n) #define WORKING_AREA(s, n) stkalign_t s[THD_WA_SIZE(n) / sizeof(stkalign_t)]; -#define WorkingArea(s, n) WORKING_AREA(s, n) #define chSysLock() asm volatile ("cli") diff --git a/ports/MSP430/chcore.h b/ports/MSP430/chcore.h index 5246b2621..996f88912 100644 --- a/ports/MSP430/chcore.h +++ b/ports/MSP430/chcore.h @@ -84,17 +84,14 @@ typedef struct { #define INT_REQUIRED_STACK 32 #define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1) -#define StackAlign(n) STACK_ALIGN(n) #define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \ sizeof(struct intctx) + \ sizeof(struct extctx) + \ (n) + \ INT_REQUIRED_STACK) -#define UserStackSize(n) THD_WA_SIZE(n) #define WORKING_AREA(s, n) stkalign_t s[THD_WA_SIZE(n) / sizeof(stkalign_t)]; -#define WorkingArea(s, n) WORKING_AREA(s, n) #define chSysLock() asm volatile ("dint") #define chSysUnlock() asm volatile ("eint") -- cgit v1.2.3