summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/ucontext.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-10-15 02:04:52 +0000
committerpeter <peter@FreeBSD.org>2003-10-15 02:04:52 +0000
commit8f60b15573bbc5ccd0cf8c55a2305c44dbbe1887 (patch)
treeca3ee7b40d4d7fdc5c4367c1155f908ae82c000e /sys/amd64/include/ucontext.h
parent1e073a3aa6dc2f45cd340e05614e5d44fa33c4fe (diff)
downloadFreeBSD-src-8f60b15573bbc5ccd0cf8c55a2305c44dbbe1887.zip
FreeBSD-src-8f60b15573bbc5ccd0cf8c55a2305c44dbbe1887.tar.gz
Pull the tier-2 card one last time and break the get/setcontext and
sigreturn() ABI and the signal context on the stack. Make the trapframe (and its shadows in the ucontext and sigframe etc) 8 bytes larger in order to preserve 16 byte stack alignment for the following C code calls. I could have done some padding after the trapframe was saved, but some of the C code still expects an argument of 'struct trapframe'. Anyway, this gives me a spare field that can be used to store things like 'partial trapframe' status or something else in the future. The runtime impact is fairly small, *except* for threaded apps and things that decode contexts and the signal stack (eg: cvsup binary). Signal delivery isn't too badly affected because the kernel generates the sigframe that sigreturn uses after the handler has been called. The size of mcontext_t and struct sigframe hasn't changed. Only the last few fields (sc_eip etc) got moved a little and I eliminated a spare field. mc_len/sc_len did change location though so the sanity checks there will still trap it.
Diffstat (limited to 'sys/amd64/include/ucontext.h')
-rw-r--r--sys/amd64/include/ucontext.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/include/ucontext.h b/sys/amd64/include/ucontext.h
index 7e68dc1..ca2044c 100644
--- a/sys/amd64/include/ucontext.h
+++ b/sys/amd64/include/ucontext.h
@@ -55,6 +55,7 @@ typedef struct __mcontext {
__register_t mc_r15;
__register_t mc_trapno;
__register_t mc_addr;
+ __register_t mc_flags;
__register_t mc_err;
__register_t mc_rip;
__register_t mc_cs;
@@ -70,12 +71,11 @@ typedef struct __mcontext {
#define _MC_FPOWNED_FPU 0x20001 /* FP state came from FPU */
#define _MC_FPOWNED_PCB 0x20002 /* FP state came from PCB */
long mc_ownedfp;
- long mc_spare1[1]; /* align mc_fpstate to 16 bytes */
/*
* See <machine/npx.h> for the internals of mc_fpstate[].
*/
long mc_fpstate[64] __aligned(16);
- long mc_spare2[8];
+ long mc_spare[8];
} mcontext_t;
#endif /* !_MACHINE_UCONTEXT_H_ */
OpenPOWER on IntegriCloud