summaryrefslogtreecommitdiff
path: root/nuttx/arch/sim/src/up_createstack.c
diff options
context:
space:
mode:
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;