xref: /freebsd/sys/powerpc/include/setjmp.h (revision a18c313e4a629099f2a747656e6307b6065616d5)
1085f8416SMike Barcroft /*-
2085f8416SMike Barcroft  *	$NetBSD: setjmp.h,v 1.3 1998/09/16 23:51:27 thorpej Exp $
3085f8416SMike Barcroft  * $FreeBSD$
4085f8416SMike Barcroft  */
527499504SDavid E. O'Brien 
699bc8c72SBenno Rice #ifndef _MACHINE_SETJMP_H_
799bc8c72SBenno Rice #define	_MACHINE_SETJMP_H_
899bc8c72SBenno Rice 
9e61d3b10SMike Barcroft #include <sys/cdefs.h>
10e61d3b10SMike Barcroft 
11*a18c313eSNathan Whitehorn #ifdef _KERNEL
12*a18c313eSNathan Whitehorn #define	_JBLEN	25	/* Kernel doesn't save FP and Altivec regs */
13*a18c313eSNathan Whitehorn #else
1499bc8c72SBenno Rice #define	_JBLEN	100
15*a18c313eSNathan Whitehorn #endif
1627499504SDavid E. O'Brien 
1727499504SDavid E. O'Brien /*
1827499504SDavid E. O'Brien  * jmp_buf and sigjmp_buf are encapsulated in different structs to force
1927499504SDavid E. O'Brien  * compile-time diagnostics for mismatches.  The structs are the same
2027499504SDavid E. O'Brien  * internally to avoid some run-time errors for mismatches.
2127499504SDavid E. O'Brien  */
22e61d3b10SMike Barcroft #if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE
2399bc8c72SBenno Rice typedef	struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1];
2499bc8c72SBenno Rice #endif
2527499504SDavid E. O'Brien 
2699bc8c72SBenno Rice typedef	struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1];
2799bc8c72SBenno Rice 
28085f8416SMike Barcroft #endif /* !_MACHINE_SETJMP_H_ */
29