From 642b5fb0007b64c77d186fcb018d571152ee1d47 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 14 Aug 2023 18:51:07 +0200 Subject: reorganization: first steps --- src/libc/include/setjmp.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/libc/include/setjmp.h (limited to 'src/libc/include/setjmp.h') diff --git a/src/libc/include/setjmp.h b/src/libc/include/setjmp.h new file mode 100644 index 0000000..6d05d79 --- /dev/null +++ b/src/libc/include/setjmp.h @@ -0,0 +1,18 @@ +#pragma once +#include + +typedef uint64_t jmp_buf[8]; /* rbx, rsp, rbp, r12, r13, r14, r15, rip */ +typedef char sigjmp_buf[1]; + +int setjmp(jmp_buf env); +_Noreturn void longjmp(jmp_buf env, int val); + +static inline int sigsetjmp(sigjmp_buf env, int savemask) { + (void)env; (void)savemask; + return 0; +} + +static inline _Noreturn void siglongjmp(sigjmp_buf env, int val) { + (void)env; (void)val; + __libc_panic("unimplemented"); +} -- cgit v1.2.3