diff options
-rw-r--r-- | sys/alpha/include/setjmp.h | 21 | ||||
-rw-r--r-- | sys/amd64/include/setjmp.h | 15 | ||||
-rw-r--r-- | sys/i386/include/setjmp.h | 15 | ||||
-rw-r--r-- | sys/ia64/include/setjmp.h | 126 | ||||
-rw-r--r-- | sys/powerpc/include/setjmp.h | 16 | ||||
-rw-r--r-- | sys/sparc64/include/setjmp.h | 8 |
6 files changed, 112 insertions, 89 deletions
diff --git a/sys/alpha/include/setjmp.h b/sys/alpha/include/setjmp.h index 3cc52dc..d808f97 100644 --- a/sys/alpha/include/setjmp.h +++ b/sys/alpha/include/setjmp.h @@ -1,7 +1,4 @@ -/* $FreeBSD$ */ -/* From: NetBSD: setjmp.h,v 1.2 1997/04/06 08:47:41 cgd Exp */ - -/* +/*- * Copyright (c) 1994, 1995 Carnegie-Mellon University. * All rights reserved. * @@ -26,13 +23,19 @@ * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. + * + * $NetBSD: setjmp.h,v 1.2 1997/04/06 08:47:41 cgd Exp $ + * $FreeBSD$ */ /* * machine/setjmp.h: machine dependent setjmp-related information. */ -#define _JBLEN 81 /* size, in longs, of a jmp_buf */ +#ifndef _MACHINE_SETJMP_H_ +#define _MACHINE_SETJMP_H_ + +#define _JBLEN 81 /* Size, in longs, of a jmp_buf. */ /* * jmp_buf and sigjmp_buf are encapsulated in different structs to force @@ -40,7 +43,9 @@ * internally to avoid some run-time errors for mismatches. */ #ifndef _ANSI_SOURCE -typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1]; -#endif /* not ANSI */ +typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1]; +#endif + +typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1]; -typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1]; +#endif /* !_MACHINE_SETJMP_H_ */ diff --git a/sys/amd64/include/setjmp.h b/sys/amd64/include/setjmp.h index a311d83..092545f 100644 --- a/sys/amd64/include/setjmp.h +++ b/sys/amd64/include/setjmp.h @@ -1,5 +1,4 @@ -/* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>. * All rights reserved. * @@ -30,8 +29,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD$ */ +#ifndef _MACHINE_SETJMP_H_ +#define _MACHINE_SETJMP_H_ + #define _JBLEN 11 /* Size of the jmp_buf on x86. */ /* @@ -40,7 +43,9 @@ * internally to avoid some run-time errors for mismatches. */ #ifndef _ANSI_SOURCE -typedef struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1]; -#endif /* not ANSI */ +typedef struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1]; +#endif + +typedef struct _jmp_buf { int _jb[_JBLEN + 1]; } jmp_buf[1]; -typedef struct _jmp_buf { int _jb[_JBLEN + 1]; } jmp_buf[1]; +#endif /* !_MACHINE_SETJMP_H_ */ diff --git a/sys/i386/include/setjmp.h b/sys/i386/include/setjmp.h index a311d83..092545f 100644 --- a/sys/i386/include/setjmp.h +++ b/sys/i386/include/setjmp.h @@ -1,5 +1,4 @@ -/* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>. * All rights reserved. * @@ -30,8 +29,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD$ */ +#ifndef _MACHINE_SETJMP_H_ +#define _MACHINE_SETJMP_H_ + #define _JBLEN 11 /* Size of the jmp_buf on x86. */ /* @@ -40,7 +43,9 @@ * internally to avoid some run-time errors for mismatches. */ #ifndef _ANSI_SOURCE -typedef struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1]; -#endif /* not ANSI */ +typedef struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1]; +#endif + +typedef struct _jmp_buf { int _jb[_JBLEN + 1]; } jmp_buf[1]; -typedef struct _jmp_buf { int _jb[_JBLEN + 1]; } jmp_buf[1]; +#endif /* !_MACHINE_SETJMP_H_ */ diff --git a/sys/ia64/include/setjmp.h b/sys/ia64/include/setjmp.h index 50f9adb..a873208 100644 --- a/sys/ia64/include/setjmp.h +++ b/sys/ia64/include/setjmp.h @@ -1,5 +1,4 @@ -/* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000 * Intel Corporation. * All rights reserved. @@ -37,67 +36,71 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * + * $FreeBSD$ */ +#ifndef _MACHINE_SETJMP_H_ +#define _MACHINE_SETJMP_H_ + /* - * IA64 assembler doesn't like C style comments. This also means we can't - * include other include files to get things like the roundup2() macro. + * IA64 assembler doesn't like C style comments. This also means we can't + * include other include files to get things like the roundup2() macro. * - * NOTE: Actual register storage must start on a 16 byte boundary. Both - * setjmp and longjmp make that adjustment before referencing the contents - * of jmp_buf. The macro JMPBUF_ADDR_OF( buf, item ) allows someone to get - * the address of an individual item saved in jmp_buf + * NOTE: Actual register storage must start on a 16 byte boundary. Both + * setjmp and longjmp make that adjustment before referencing the contents + * of jmp_buf. The macro JMPBUF_ADDR_OF() allows someone to get the address + * of an individual item saved in jmp_buf. */ -#define our_roundup(x, y) (((x)+((y)-1))&(~((y)-1))) +#define our_roundup(x, y) (((x)+((y)-1))&(~((y)-1))) -#define JMPBUF_ALIGNMENT 0x10 -#define JMPBUF_ADDR_OF( buf, item ) \ - ((size_t)((our_roundup((size_t)buf, JMPBUF_ALIGNMENT)) + item)) +#define JMPBUF_ALIGNMENT 0x10 +#define JMPBUF_ADDR_OF(buf, item) \ + ((size_t)((our_roundup((size_t)buf, JMPBUF_ALIGNMENT)) + item)) -#define J_UNAT 0 -#define J_NATS 0x8 -#define J_PFS 0x10 -#define J_BSP 0x18 -#define J_RNAT 0x20 -#define J_PREDS 0x28 -#define J_LC 0x30 -#define J_R4 0x38 -#define J_R5 0x40 -#define J_R6 0x48 -#define J_R7 0x50 -#define J_SP 0x58 -#define J_F2 0x60 -#define J_F3 0x70 -#define J_F4 0x80 -#define J_F5 0x90 -#define J_F16 0xa0 -#define J_F17 0xb0 -#define J_F18 0xc0 -#define J_F19 0xd0 -#define J_F20 0xe0 -#define J_F21 0xf0 -#define J_F22 0x100 -#define J_F23 0x110 -#define J_F24 0x120 -#define J_F25 0x130 -#define J_F26 0x140 -#define J_F27 0x150 -#define J_F28 0x160 -#define J_F29 0x170 -#define J_F30 0x180 -#define J_F31 0x190 -#define J_FPSR 0x1a0 -#define J_B0 0x1a8 -#define J_B1 0x1b0 -#define J_B2 0x1b8 -#define J_B3 0x1c0 -#define J_B4 0x1c8 -#define J_B5 0x1d0 -#define J_SIG0 0x1d8 -#define J_SIG1 0x1e0 -#define J_SIGMASK 0x1e8 -#define J_END 0x1f0 +#define J_UNAT 0 +#define J_NATS 0x8 +#define J_PFS 0x10 +#define J_BSP 0x18 +#define J_RNAT 0x20 +#define J_PREDS 0x28 +#define J_LC 0x30 +#define J_R4 0x38 +#define J_R5 0x40 +#define J_R6 0x48 +#define J_R7 0x50 +#define J_SP 0x58 +#define J_F2 0x60 +#define J_F3 0x70 +#define J_F4 0x80 +#define J_F5 0x90 +#define J_F16 0xa0 +#define J_F17 0xb0 +#define J_F18 0xc0 +#define J_F19 0xd0 +#define J_F20 0xe0 +#define J_F21 0xf0 +#define J_F22 0x100 +#define J_F23 0x110 +#define J_F24 0x120 +#define J_F25 0x130 +#define J_F26 0x140 +#define J_F27 0x150 +#define J_F28 0x160 +#define J_F29 0x170 +#define J_F30 0x180 +#define J_F31 0x190 +#define J_FPSR 0x1a0 +#define J_B0 0x1a8 +#define J_B1 0x1b0 +#define J_B2 0x1b8 +#define J_B3 0x1c0 +#define J_B4 0x1c8 +#define J_B5 0x1d0 +#define J_SIG0 0x1d8 +#define J_SIG1 0x1e0 +#define J_SIGMASK 0x1e8 +#define J_END 0x1f0 #ifndef LOCORE /* @@ -106,11 +109,14 @@ * internally to avoid some run-time errors for mismatches. */ #ifndef _ANSI_SOURCE -typedef struct _sigjmp_buf { - char Buffer[ J_END + JMPBUF_ALIGNMENT ]; +typedef struct _sigjmp_buf { + char Buffer[J_END + JMPBUF_ALIGNMENT]; } sigjmp_buf[1]; -#endif /* not ANSI */ -typedef struct _jmp_buf { - char Buffer[ J_END + JMPBUF_ALIGNMENT ]; +#endif + +typedef struct _jmp_buf { + char Buffer[J_END + JMPBUF_ALIGNMENT]; } jmp_buf[1]; #endif + +#endif /* !_MACHINE_SETJMP_H_ */ diff --git a/sys/powerpc/include/setjmp.h b/sys/powerpc/include/setjmp.h index 9394b04..f6d1378 100644 --- a/sys/powerpc/include/setjmp.h +++ b/sys/powerpc/include/setjmp.h @@ -1,8 +1,10 @@ -/* $FreeBSD$ */ -/* $NetBSD: setjmp.h,v 1.3 1998/09/16 23:51:27 thorpej Exp $ */ +/*- + * $NetBSD: setjmp.h,v 1.3 1998/09/16 23:51:27 thorpej Exp $ + * $FreeBSD$ + */ -#ifndef _MACHINE_SETJMP_H_ -#define _MACHINE_SETJMP_H_ +#ifndef _MACHINE_SETJMP_H_ +#define _MACHINE_SETJMP_H_ #define _JBLEN 100 @@ -12,9 +14,9 @@ * internally to avoid some run-time errors for mismatches. */ #ifndef _ANSI_SOURCE -typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1]; +typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1]; #endif -typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1]; +typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1]; -#endif /* _MACHINE_SETJMP_H_ */ +#endif /* !_MACHINE_SETJMP_H_ */ diff --git a/sys/sparc64/include/setjmp.h b/sys/sparc64/include/setjmp.h index 5b2c673..1668cff 100644 --- a/sys/sparc64/include/setjmp.h +++ b/sys/sparc64/include/setjmp.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>. * All rights reserved. * @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: FreeBSD: src/sys/i386/include/setjmp.h,v 1.5 2000/10/06 + * From: FreeBSD: src/sys/i386/include/setjmp.h,v 1.5 2000/10/06 * $FreeBSD$ */ @@ -50,9 +50,9 @@ * internally to avoid some run-time errors for mismatches. */ #ifndef _ANSI_SOURCE -typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1]; +typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1]; #endif -typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1]; +typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1]; #endif /* !_MACHINE_SETJMP_H_ */ |