Remove mon_gfp()
[akaros.git] / kern / include / setjmp.h
1 // Kernel implementations for setjmp/longjmp.
2
3 #pragma once
4
5 #include <arch/setjmp.h>
6
7 int slim_setjmp(struct jmpbuf *env) __attribute__((returns_twice));
8 void longjmp(struct jmpbuf *env, int val) __attribute__((noreturn));
9
10 #pragma GCC diagnostic push
11 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
12
13 #define setjmp(jb) ({bool err;                                                 \
14                     __ros_clobber_callee_regs();                               \
15                     err = slim_setjmp(jb);                                     \
16                     err;})
17
18 #pragma GCC diagnostic pop