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

A jump buffer.

Functions

Non-local goto with signal handling

Set jump point for a non-local goto.