diff options
author | dzwdz | 2022-08-28 23:54:47 +0200 |
---|---|---|
committer | dzwdz | 2022-08-28 23:54:47 +0200 |
commit | edb7fc07bf93e4a1883cccf45ad7a4b2cbf390d9 (patch) | |
tree | 1df1e95e52d54d538d345cbf455bed096d9a1bb0 /src/user/lib/include/setjmp.h | |
parent | f2eb3a78c7b69c4b8e118d91327cc5c1016481fc (diff) |
user/lua: prepare libc headers
Diffstat (limited to 'src/user/lib/include/setjmp.h')
-rw-r--r-- | src/user/lib/include/setjmp.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/user/lib/include/setjmp.h b/src/user/lib/include/setjmp.h index f90bae9..51c7fd2 100644 --- a/src/user/lib/include/setjmp.h +++ b/src/user/lib/include/setjmp.h @@ -1,13 +1,25 @@ #pragma once #include <user/lib/panic.h> -typedef char sigjmp_buf; +typedef char jmp_buf[1]; +typedef char sigjmp_buf[1]; + +static inline int setjmp(jmp_buf env) { + (void)env; + return 0; +} + static inline int sigsetjmp(sigjmp_buf env, int savemask) { (void)env; (void)savemask; return 0; } -static inline void siglongjmp(sigjmp_buf env, int val) { +static inline _Noreturn void longjmp(jmp_buf env, int val) { + (void)env; (void)val; + __libc_panic("unimplemented"); +} + +static inline _Noreturn void siglongjmp(sigjmp_buf env, int val) { (void)env; (void)val; __libc_panic("unimplemented"); } |