summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/common
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-04 22:25:03 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-04 22:25:03 +0000
commit55d4f54ef204271e27703b5e7a89d58c13c2b294 (patch)
tree6c93fd2fd198db318cd4a014622e1273b1ede69d /nuttx/arch/arm/src/common
parent4215984218b33387d048353b23140f4bec0dfae2 (diff)
downloadpx4-nuttx-55d4f54ef204271e27703b5e7a89d58c13c2b294.tar.gz
px4-nuttx-55d4f54ef204271e27703b5e7a89d58c13c2b294.tar.bz2
px4-nuttx-55d4f54ef204271e27703b5e7a89d58c13c2b294.zip
First cut at x86 build environment
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3336 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/common')
-rw-r--r--nuttx/arch/arm/src/common/up_createstack.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/arch/arm/src/common/up_createstack.c b/nuttx/arch/arm/src/common/up_createstack.c
index f56d36390..0c9f0809f 100644
--- a/nuttx/arch/arm/src/common/up_createstack.c
+++ b/nuttx/arch/arm/src/common/up_createstack.c
@@ -109,18 +109,18 @@ int up_create_stack(_TCB *tcb, size_t stack_size)
size_t size_of_stack;
/* The ARM uses a push-down stack: the stack grows
- * toward loweraddresses in memory. The stack pointer
- * register, points to the lowest, valid work address
- * (the "top" of the stack). Items on the stack are
- * referenced as positive word offsets from sp.
- */
+ * toward loweraddresses in memory. The stack pointer
+ * register, points to the lowest, valid work address
+ * (the "top" of the stack). Items on the stack are
+ * referenced as positive word offsets from sp.
+ */
top_of_stack = (uint32_t)tcb->stack_alloc_ptr + stack_size - 4;
/* The ARM stack must be aligned at word (4 byte)
- * boundaries. If necessary top_of_stack must be rounded
- * down to the next boundary
- */
+ * boundaries. If necessary top_of_stack must be rounded
+ * down to the next boundary
+ */
top_of_stack &= ~3;
size_of_stack = top_of_stack - (uint32_t)tcb->stack_alloc_ptr + 4;