#ifndef _LIBC_SETJMP_H #define _LIBC_SETJMP_H #pragma once #ifdef __cplusplus extern "C" { #endif #if defined(__aarch64__) typedef unsigned long jmp_buf[21]; /* x19-x30, sp, d8-d15 */ #else typedef unsigned long jmp_buf[8]; /* rbx, rbp, r12-r15, rsp, rip */ #endif int setjmp(jmp_buf env); void longjmp(jmp_buf env, int val) __attribute__((noreturn)); #ifdef __cplusplus } #endif #endif /* _LIBC_SETJMP_H */