2002-10-04 22:10:06 +00:00
|
|
|
/*-
|
|
|
|
* $NetBSD: setjmp.h,v 1.3 1998/09/16 23:51:27 thorpej Exp $
|
|
|
|
* $FreeBSD$
|
|
|
|
*/
|
2001-01-02 00:34:24 +00:00
|
|
|
|
2002-10-04 22:10:06 +00:00
|
|
|
#ifndef _MACHINE_SETJMP_H_
|
|
|
|
#define _MACHINE_SETJMP_H_
|
2002-07-10 12:26:17 +00:00
|
|
|
|
2002-10-05 05:47:56 +00:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
|
2016-01-10 16:42:14 +00:00
|
|
|
#ifdef _KERNEL
|
|
|
|
#define _JBLEN 25 /* Kernel doesn't save FP and Altivec regs */
|
|
|
|
#else
|
2002-07-10 12:26:17 +00:00
|
|
|
#define _JBLEN 100
|
2016-01-10 16:42:14 +00:00
|
|
|
#endif
|
2001-01-02 00:34:24 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
2002-10-05 05:47:56 +00:00
|
|
|
#if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE
|
2002-10-04 22:10:06 +00:00
|
|
|
typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1];
|
2002-07-10 12:26:17 +00:00
|
|
|
#endif
|
|
|
|
|
2002-10-04 22:10:06 +00:00
|
|
|
typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1];
|
2001-01-02 00:34:24 +00:00
|
|
|
|
2002-10-04 22:10:06 +00:00
|
|
|
#endif /* !_MACHINE_SETJMP_H_ */
|