Avoid using __aligned(16). Instead define the jmp_buf in terms of

long doubles. This gives us 16-byte alignment. Add a CTASSERT for
the size of the jmp_buf to detect ABI breakages.
This commit is contained in:
Marcel Moolenaar 2003-07-26 08:03:43 +00:00
parent a8d43c90af
commit 4f373ec187
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118048

View File

@ -90,11 +90,7 @@
#define J_SIGSET 0x1e0
#endif /* __BSD_VISIBLE */
/*
* We only have 16 bytes left for future use, but it's a nice round,
* but above all large number. Size is in bytes.
*/
#define _JMPBUFSZ 0x200
#define _JBLEN 0x20 /* Size in long doubles */
/*
* XXX this check is wrong, since LOCORE is in the application namespace and
@ -113,16 +109,22 @@
*/
#if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE
struct _sigjmp_buf {
char _Buffer[_JMPBUFSZ];
} __aligned(16);
long double buf[_JBLEN];
};
typedef struct _sigjmp_buf sigjmp_buf[1];
#endif
struct _jmp_buf {
char _Buffer[_JMPBUFSZ];
} __aligned(16);
long double buf[_JBLEN];
};
typedef struct _jmp_buf jmp_buf[1];
#ifdef _KERNEL
#ifdef CTASSERT
CTASSERT(sizeof(struct _jmp_buf) == 512);
#endif
#endif
#endif /* !LOCORE */
#endif /* !_MACHINE_SETJMP_H_ */