clone_stack

Function clone_stack 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn clone_stack(sp: Stack) -> Stack
Expand description

Clone the current stack for spawning a child strand

Allocates a new stack buffer and copies all values from the current stack. Returns a pointer to the first value in the new stack (like Stack convention).

ยงSafety

  • Current stack must have a valid base set via set_stack_base
  • sp must point to a valid position within the current stack