summaryrefslogtreecommitdiff
path: root/nuttx/arch/sim/src/up_createstack.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-21 21:55:16 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-21 21:55:16 +0000
commitefc2cf23a849f7be1d65c4cdd7767f88917c46a7 (patch)
treefbe3518a364d6b9d811e00f7201e082d50ead7e3 /nuttx/arch/sim/src/up_createstack.c
parent94e5b72f50f3096b83fe50c7b57324a08e318f29 (diff)
downloadpx4-nuttx-efc2cf23a849f7be1d65c4cdd7767f88917c46a7.tar.gz
px4-nuttx-efc2cf23a849f7be1d65c4cdd7767f88917c46a7.tar.bz2
px4-nuttx-efc2cf23a849f7be1d65c4cdd7767f88917c46a7.zip
Progress toward clean SDCC compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@18 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/sim/src/up_createstack.c')
-rw-r--r--nuttx/arch/sim/src/up_createstack.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/nuttx/arch/sim/src/up_createstack.c b/nuttx/arch/sim/src/up_createstack.c
index 0e2c63e4d..845c76661 100644
--- a/nuttx/arch/sim/src/up_createstack.c
+++ b/nuttx/arch/sim/src/up_createstack.c
@@ -81,14 +81,14 @@
*
************************************************************/
-STATUS up_create_stack(_TCB *tcb, uint32 stack_size)
+STATUS up_create_stack(_TCB *tcb, size_t stack_size)
{
STATUS ret = ERROR;
/* Move up to next even word boundary if necessary */
- uint32 adj_stack_size = (stack_size + 3) & ~3;
- uint32 adj_stack_words = adj_stack_size >> 2;
+ size_t adj_stack_size = (stack_size + 3) & ~3;
+ size_t adj_stack_words = adj_stack_size >> 2;
/* Allocate the memory for the stack */
@@ -97,9 +97,10 @@ STATUS up_create_stack(_TCB *tcb, uint32 stack_size)
{
/* This is the address of the last word in the allocation */
- uint32 *adj_stack_ptr = &stack_alloc_ptr[adj_stack_words - 1];
+ size_t *adj_stack_ptr = &stack_alloc_ptr[adj_stack_words - 1];
/* Save the values in the TCB */
+
tcb->adj_stack_size = adj_stack_size;
tcb->stack_alloc_ptr = stack_alloc_ptr;
tcb->adj_stack_ptr = adj_stack_ptr;