From efc2cf23a849f7be1d65c4cdd7767f88917c46a7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 21 Feb 2007 21:55:16 +0000 Subject: Progress toward clean SDCC compilation git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@18 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/sim/src/up_createstack.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'nuttx/arch/sim/src/up_createstack.c') 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; -- cgit v1.2.3