aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2024-09-12 14:17:20 +0100
committerMichael Brown <mcb30@ipxe.org>2024-09-12 15:01:04 +0100
commit5de5d4626e192f5d0e6c97e14ce03b92a43622b3 (patch)
tree3947d6e1f9b5c877140006f248147f2e503e8e41 /src/include
parenta1830ff43c5f8ee2957eb537f24670265ebd233b (diff)
downloadipxe-5de5d4626e192f5d0e6c97e14ce03b92a43622b3.tar.gz
[libc] Centralise architecture-independent portions of setjmp.h
The definitions of the setjmp() and longjmp() functions are common to all architectures, with only the definition of the jump buffer structure being architecture-specific. Move the architecture-specific portions to bits/setjmp.h and provide a common setjmp.h for the function definitions. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/setjmp.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/setjmp.h b/src/include/setjmp.h
new file mode 100644
index 000000000..d8cd02f46
--- /dev/null
+++ b/src/include/setjmp.h
@@ -0,0 +1,14 @@
+#ifndef _SETJMP_H
+#define _SETJMP_H
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <bits/setjmp.h>
+
+extern int __asmcall __attribute__ (( returns_twice ))
+setjmp ( jmp_buf env );
+
+extern void __asmcall __attribute__ (( noreturn ))
+longjmp ( jmp_buf env, int val );
+
+#endif /* _SETJMP_H */