diff options
Diffstat (limited to 'nuttx/arch/sim/src/up_usestack.c')
-rw-r--r-- | nuttx/arch/sim/src/up_usestack.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nuttx/arch/sim/src/up_usestack.c b/nuttx/arch/sim/src/up_usestack.c index 26bf14b21..0c6e7650f 100644 --- a/nuttx/arch/sim/src/up_usestack.c +++ b/nuttx/arch/sim/src/up_usestack.c @@ -81,18 +81,19 @@ * ************************************************************/ -STATUS up_use_stack(_TCB *tcb, uint32 *stack, uint32 stack_size) +STATUS up_use_stack(_TCB *tcb, void *stack, size_t stack_size) { /* Move up to next even word boundary if necessary */ - uint32 adj_stack_size = stack_size & ~3; - uint32 adj_stack_words = adj_stack_size >> 2; + size_t adj_stack_size = stack_size & ~3; + size_t adj_stack_words = adj_stack_size >> 2; /* This is the address of the last word in the allocation */ - uint32 *adj_stack_ptr = &stack[adj_stack_words - 1]; + size_t *adj_stack_ptr = &stack[adj_stack_words - 1]; /* Save the values in the TCB */ + tcb->adj_stack_size = adj_stack_size; tcb->stack_alloc_ptr = stack; tcb->adj_stack_ptr = adj_stack_ptr; |