Function wasix::stack_checkpoint
source · [−]pub unsafe fn stack_checkpoint(
snapshot: *mut StackSnapshot
) -> Result<Longsize, Errno>Expand description
Creates a checkpoint of the current stack which allows it to be restored later using its stack hash. The value supplied will be returned upon restoration (and hence must be none zero) - zero will be returned when the stack is first recorded. This function will read the __stack_pointer global
Parameters
snapshot- Reference to the stack snapshot that will be filled
Return
Returns zero upon registration and the value when restored