summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eischen <deischen@FreeBSD.org>2002-01-10 02:32:30 +0000
committerDaniel Eischen <deischen@FreeBSD.org>2002-01-10 02:32:30 +0000
commit2e615b482d8dfc25ce89b48a6191188e728d168a (patch)
treee609c87db3eb6c094b3557905385dd042dff73fa
parenta7f6ff2e8c7edb02c028b866f6e092dd312210ca (diff)
Notes
-rw-r--r--sys/amd64/amd64/machdep.c1
-rw-r--r--sys/amd64/include/ucontext.h5
-rw-r--r--sys/i386/i386/machdep.c1
-rw-r--r--sys/i386/include/ucontext.h5
4 files changed, 10 insertions, 2 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 349a14084f9f..79381594ef1f 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -463,6 +463,7 @@ sendsig(catcher, sig, mask, code)
? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE;
sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0;
sf.sf_uc.uc_mcontext.mc_gs = rgs();
+ sf.sf_uc.uc_mcontext.mc_flags = __UC_MC_VALID; /* no FP regs */
bcopy(regs, &sf.sf_uc.uc_mcontext.mc_fs, sizeof(*regs));
/* Allocate and validate space for the signal handler context. */
diff --git a/sys/amd64/include/ucontext.h b/sys/amd64/include/ucontext.h
index c0a3aa8e1c6e..a84a2cb3fe3b 100644
--- a/sys/amd64/include/ucontext.h
+++ b/sys/amd64/include/ucontext.h
@@ -59,7 +59,10 @@ typedef struct __mcontext {
int mc_ss;
int mc_fpregs[28]; /* env87 + fpacc87 + u_long */
- int __spare__[17];
+#define __UC_MC_VALID 0x0001 /* mcontext register state is valid */
+#define __UC_FP_VALID 0x0002 /* FP registers have been saved */
+ int mc_flags;
+ int __spare__[16];
} mcontext_t;
#endif /* !_MACHINE_UCONTEXT_H_ */
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 349a14084f9f..79381594ef1f 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -463,6 +463,7 @@ sendsig(catcher, sig, mask, code)
? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE;
sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0;
sf.sf_uc.uc_mcontext.mc_gs = rgs();
+ sf.sf_uc.uc_mcontext.mc_flags = __UC_MC_VALID; /* no FP regs */
bcopy(regs, &sf.sf_uc.uc_mcontext.mc_fs, sizeof(*regs));
/* Allocate and validate space for the signal handler context. */
diff --git a/sys/i386/include/ucontext.h b/sys/i386/include/ucontext.h
index c0a3aa8e1c6e..a84a2cb3fe3b 100644
--- a/sys/i386/include/ucontext.h
+++ b/sys/i386/include/ucontext.h
@@ -59,7 +59,10 @@ typedef struct __mcontext {
int mc_ss;
int mc_fpregs[28]; /* env87 + fpacc87 + u_long */
- int __spare__[17];
+#define __UC_MC_VALID 0x0001 /* mcontext register state is valid */
+#define __UC_FP_VALID 0x0002 /* FP registers have been saved */
+ int mc_flags;
+ int __spare__[16];
} mcontext_t;
#endif /* !_MACHINE_UCONTEXT_H_ */