Skip to contentSkip to conversation

x86: move struct definitions to unifed sigframe.h

PATCH Applied Harvey Harrison 1 participant 1 message Feb 8, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 7/9 x86: move struct definitions to unifed sigframe.h

---
 arch/x86/kernel/sigframe_32.h |    9 +++++++++
 arch/x86/kernel/signal_32.c   |    2 +-
 arch/x86/kernel/signal_64.c   |    9 +--------
 3 files changed, 11 insertions(+), 9 deletions(-)
arch/x86/kernel/sigframe_32.h +9 -0
index 0b22217..1284e8b 100644
@@ -1,3 +1,4 @@
+#ifdef CONFIG_X86_32
 struct sigframe
 {
 	char __user *pretcode;
@@ -19,3 +20,11 @@ struct rt_sigframe
 	struct _fpstate fpstate;
 	char retcode[8];
 };
+#else
+struct rt_sigframe
+{
+	char __user *pretcode;
+	struct ucontext uc;
+	struct siginfo info;
+};
+#endif
arch/x86/kernel/signal_32.c +1 -1
index cf6bedf..858a71f 100644
@@ -24,7 +24,7 @@
 #include <asm/uaccess.h>
 #include <asm/i387.h>
 #include <asm/vdso.h>
-#include "sigframe_32.h"
+#include "sigframe.h"
 
 #define DEBUG_SIG 0
 
arch/x86/kernel/signal_64.c +1 -8
index fb27473..f006ea1 100644
@@ -26,6 +26,7 @@
 #include <asm/proto.h>
 #include <asm/ia32_unistd.h>
 #include <asm/mce.h>
+#include "sigframe.h"
 
 /* #define DEBUG_SIG 1 */
 
@@ -59,14 +60,6 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
 /*
  * Do a signal return; undo the signal stack.
  */
-
-struct rt_sigframe
-{
-	char __user *pretcode;
-	struct ucontext uc;
-	struct siginfo info;
-};
-
 static int
 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, unsigned long *prax)
 {
Signature · 1 line
1.5.4.1219.g65b9