aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-LPC214x-GCC/chcore.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2007-11-22 15:24:50 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2007-11-22 15:24:50 +0000
commit97bf45204321755cf2e78a7cc7ff616edaec59c4 (patch)
tree12d06ab98ac32707ddb3ee228c4ed7f9e2870b1e /demos/ARM7-LPC214x-GCC/chcore.h
parent080fb7d084f878e792563a60a255b5fc993ae0ba (diff)
downloadChibiOS-97bf45204321755cf2e78a7cc7ff616edaec59c4.tar.gz
ChibiOS-97bf45204321755cf2e78a7cc7ff616edaec59c4.tar.bz2
ChibiOS-97bf45204321755cf2e78a7cc7ff616edaec59c4.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@105 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-LPC214x-GCC/chcore.h')
-rw-r--r--demos/ARM7-LPC214x-GCC/chcore.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/demos/ARM7-LPC214x-GCC/chcore.h b/demos/ARM7-LPC214x-GCC/chcore.h
index 5217e30f6..d5ad07040 100644
--- a/demos/ARM7-LPC214x-GCC/chcore.h
+++ b/demos/ARM7-LPC214x-GCC/chcore.h
@@ -95,11 +95,13 @@ extern void chSysUnlock(void);
#else /* !THUMB */
#define INT_REQUIRED_STACK 0
#endif /* THUMB */
-#define UserStackSize(n) (sizeof(Thread) + \
- sizeof(struct intctx) + \
- sizeof(struct extctx) + \
- (INT_REQUIRED_STACK) + \
- (n))
+#define UserStackSize(n) (((sizeof(Thread) + \
+ sizeof(struct intctx) + \
+ sizeof(struct extctx) + \
+ (INT_REQUIRED_STACK) + \
+ (n) - 1) | 3) + 1)
+
+#define WorkingArea(s, n) ULONG32 s[UserStackSize(n) >> 2];
/* It requires zero bytes, but better be safe.*/
#define IDLE_THREAD_STACK_SIZE 8