pub unsafe fn clone_stack_with_base(sp: Stack) -> (Stack, Stack)Expand description
Clone the current stack for spawning, returning both base and sp.
This is used by spawn to create a copy of the parent’s stack for the child strand. Returns (new_sp, new_base) so the spawn mechanism can set STACK_BASE for the child.
§Safety
Current stack must have a valid base set via set_stack_base and sp must point to a valid position.