Expand description
FFI bindings for non-local goto
use crash_handler::jmp;
unsafe {
let mut jmp_buf = std::mem::MaybeUninit::uninit();
let val = jmp::sigsetjmp(jmp_buf.as_mut_ptr(), 1);
if val == 0 {
jmp::siglongjmp(jmp_buf.as_mut_ptr(), 22);
} else {
assert_eq!(val, 22);
}
}
Structs§
- JmpBuf
- A jump buffer.
Functions§
- siglongjmp⚠
- Non-local goto with signal handling
- sigsetjmp⚠
- Set jump point for a non-local goto.