diff options
Diffstat (limited to 'nuttx/arch/z80/src/common/up_stackframe.c')
-rw-r--r-- | nuttx/arch/z80/src/common/up_stackframe.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nuttx/arch/z80/src/common/up_stackframe.c b/nuttx/arch/z80/src/common/up_stackframe.c index 228311633..fdc43a850 100644 --- a/nuttx/arch/z80/src/common/up_stackframe.c +++ b/nuttx/arch/z80/src/common/up_stackframe.c @@ -128,5 +128,11 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size) tcb->adj_stack_ptr = (FAR void *)topaddr; tcb->adj_stack_size -= frame_size; + /* Reset the initial state */ + + up_initial_state(tcb); + + /* And return a pointer to the allocated memory */ + return (FAR void *)(topaddr + sizeof(uint32_t)); } |