summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/signal.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-11-12 13:52:11 +0000
committermarcel <marcel@FreeBSD.org>1999-11-12 13:52:11 +0000
commit3c012534a7004aa8acd91c3b773c739df2cf57d4 (patch)
tree3bcff151149493c3c410a9d5d4e12414b5eda001 /sys/amd64/include/signal.h
parent03fa63a54110f4c4e4c9805ea42c7997a2e201a6 (diff)
downloadFreeBSD-src-3c012534a7004aa8acd91c3b773c739df2cf57d4.zip
FreeBSD-src-3c012534a7004aa8acd91c3b773c739df2cf57d4.tar.gz
Reserve space for FPU state in struct sigcontext. Fix some style bugs
and comments while there. Submitted by: bde
Diffstat (limited to 'sys/amd64/include/signal.h')
-rw-r--r--sys/amd64/include/signal.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/sys/amd64/include/signal.h b/sys/amd64/include/signal.h
index f02539e..e3f1b19 100644
--- a/sys/amd64/include/signal.h
+++ b/sys/amd64/include/signal.h
@@ -57,9 +57,9 @@ typedef int sig_atomic_t;
typedef unsigned int osigset_t;
struct osigcontext {
- int sc_onstack; /* sigstack state to restore */
- osigset_t sc_mask; /* signal mask to restore */
- int sc_esp; /* machine state */
+ int sc_onstack; /* sigstack state to restore */
+ osigset_t sc_mask; /* signal mask to restore */
+ int sc_esp; /* machine state follows: */
int sc_ebp;
int sc_isp;
int sc_eip;
@@ -81,13 +81,13 @@ struct osigcontext {
};
/*
- * The sequence of the fields/registers in sigcontext should match
+ * The sequence of the fields/registers in struct sigcontext should match
* those in mcontext_t.
*/
struct sigcontext {
sigset_t sc_mask; /* signal mask to restore */
int sc_onstack; /* sigstack state to restore */
- int sc_gs;
+ int sc_gs; /* machine state (struct trapframe): */
int sc_fs;
int sc_es;
int sc_ds;
@@ -104,15 +104,22 @@ struct sigcontext {
int sc_eip;
int sc_cs;
int sc_efl;
- int sc_esp; /* machine state */
+ int sc_esp;
int sc_ss;
+ /*
+ * XXX FPU state is 27 * 4 bytes h/w, 1 * 4 bytes s/w (probably not
+ * needed here), or that + 16 * 4 bytes for emulators (probably all
+ * needed here). The "spare" bytes are mostly not spare.
+ */
+ int sc_fpregs[28]; /* machine state (FPU): */
+ int sc_spare[17];
};
-#define sc_sp sc_esp
-#define sc_fp sc_ebp
-#define sc_pc sc_eip
-#define sc_ps sc_efl
-#define sc_eflags sc_efl
+#define sc_sp sc_esp
+#define sc_fp sc_ebp
+#define sc_pc sc_eip
+#define sc_ps sc_efl
+#define sc_eflags sc_efl
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
OpenPOWER on IntegriCloud