1085f8416SMike Barcroft /*- 2085f8416SMike Barcroft * $NetBSD: setjmp.h,v 1.3 1998/09/16 23:51:27 thorpej Exp $ 3085f8416SMike Barcroft */ 427499504SDavid E. O'Brien 599bc8c72SBenno Rice #ifndef _MACHINE_SETJMP_H_ 699bc8c72SBenno Rice #define _MACHINE_SETJMP_H_ 799bc8c72SBenno Rice 8e61d3b10SMike Barcroft #include <sys/cdefs.h> 9e61d3b10SMike Barcroft 10*a18c313eSNathan Whitehorn #ifdef _KERNEL 11*a18c313eSNathan Whitehorn #define _JBLEN 25 /* Kernel doesn't save FP and Altivec regs */ 12*a18c313eSNathan Whitehorn #else 1399bc8c72SBenno Rice #define _JBLEN 100 14*a18c313eSNathan Whitehorn #endif 1527499504SDavid E. O'Brien 1627499504SDavid E. O'Brien /* 1727499504SDavid E. O'Brien * jmp_buf and sigjmp_buf are encapsulated in different structs to force 1827499504SDavid E. O'Brien * compile-time diagnostics for mismatches. The structs are the same 1927499504SDavid E. O'Brien * internally to avoid some run-time errors for mismatches. 2027499504SDavid E. O'Brien */ 21e61d3b10SMike Barcroft #if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE 2299bc8c72SBenno Rice typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1]; 2399bc8c72SBenno Rice #endif 2427499504SDavid E. O'Brien 2599bc8c72SBenno Rice typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1]; 2699bc8c72SBenno Rice 27085f8416SMike Barcroft #endif /* !_MACHINE_SETJMP_H_ */ 28