aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc/include/setjmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/powerpc/include/setjmp.h')
-rw-r--r--sys/powerpc/include/setjmp.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/powerpc/include/setjmp.h b/sys/powerpc/include/setjmp.h
new file mode 100644
index 000000000000..5dc463619bca
--- /dev/null
+++ b/sys/powerpc/include/setjmp.h
@@ -0,0 +1,27 @@
+/*-
+ * $NetBSD: setjmp.h,v 1.3 1998/09/16 23:51:27 thorpej Exp $
+ */
+
+#ifndef _MACHINE_SETJMP_H_
+#define _MACHINE_SETJMP_H_
+
+#include <sys/cdefs.h>
+
+#ifdef _KERNEL
+#define _JBLEN 25 /* Kernel doesn't save FP and Altivec regs */
+#else
+#define _JBLEN 100
+#endif
+
+/*
+ * jmp_buf and sigjmp_buf are encapsulated in different structs to force
+ * compile-time diagnostics for mismatches. The structs are the same
+ * internally to avoid some run-time errors for mismatches.
+ */
+#if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE
+typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1];
+#endif
+
+typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1];
+
+#endif /* !_MACHINE_SETJMP_H_ */