summaryrefslogtreecommitdiff
path: root/src/user/lib/libc/include/setjmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/libc/include/setjmp.h')
-rw-r--r--src/user/lib/libc/include/setjmp.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/user/lib/libc/include/setjmp.h b/src/user/lib/libc/include/setjmp.h
new file mode 100644
index 0000000..3bf2027
--- /dev/null
+++ b/src/user/lib/libc/include/setjmp.h
@@ -0,0 +1,25 @@
+#ifndef DEF_LIBC_SETJMP_H
+#define DEF_LIBC_SETJMP_H
+
+#include <types.h>
+
+typedef struct {
+ uint32_t ebp; //0
+ uint32_t ebx; //4
+ uint32_t edi; //8
+ uint32_t esi; //12
+ uint32_t esp; //16
+ uint32_t eip; //20
+} jmp_buf[1];
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+int setjmp(jmp_buf env);
+void longjmp(jmp_buf, int val);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+