[CRIU] [PATCH 08/22] include/restorer.h: moved machine-dependent sigframe structs to the file arch/x86/include/asm/restorer.h

Alexander Kartashov alekskartashov at parallels.com
Thu Dec 27 01:50:59 EST 2012


Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
 arch/x86/include/asm/restorer.h |   74 +++++++++++++++++++++++++++++++++++++++
 include/restorer.h              |   66 ----------------------------------
 2 files changed, 74 insertions(+), 66 deletions(-)
 create mode 100644 arch/x86/include/asm/restorer.h

diff --git a/arch/x86/include/asm/restorer.h b/arch/x86/include/asm/restorer.h
new file mode 100644
index 0000000..e233651
--- /dev/null
+++ b/arch/x86/include/asm/restorer.h
@@ -0,0 +1,74 @@
+#ifndef __CR_ASM_RESTORER_H__
+#define __CR_ASM_RESTORER_H__
+
+#include "asm/types.h"
+#include "../protobuf/core.pb-c.h"
+
+struct pt_regs {
+	unsigned long	r15;
+	unsigned long	r14;
+	unsigned long	r13;
+	unsigned long	r12;
+	unsigned long	bp;
+	unsigned long	bx;
+
+	unsigned long	r11;
+	unsigned long	r10;
+	unsigned long	r9;
+	unsigned long	r8;
+	unsigned long	ax;
+	unsigned long	cx;
+	unsigned long	dx;
+	unsigned long	si;
+	unsigned long	di;
+	unsigned long	orig_ax;
+
+	unsigned long	ip;
+	unsigned long	cs;
+	unsigned long	flags;
+	unsigned long	sp;
+	unsigned long	ss;
+};
+
+struct rt_sigcontext {
+	unsigned long			r8;
+	unsigned long			r9;
+	unsigned long			r10;
+	unsigned long			r11;
+	unsigned long			r12;
+	unsigned long			r13;
+	unsigned long			r14;
+	unsigned long			r15;
+	unsigned long			rdi;
+	unsigned long			rsi;
+	unsigned long			rbp;
+	unsigned long			rbx;
+	unsigned long			rdx;
+	unsigned long			rax;
+	unsigned long			rcx;
+	unsigned long			rsp;
+	unsigned long			rip;
+	unsigned long			eflags;
+	unsigned short			cs;
+	unsigned short			gs;
+	unsigned short			fs;
+	unsigned short			__pad0;
+	unsigned long			err;
+	unsigned long			trapno;
+	unsigned long			oldmask;
+	unsigned long			cr2;
+	void				*fpstate;
+	unsigned long			reserved1[8];
+};
+
+#include <sigframe.h>
+
+struct rt_sigframe {
+	char			*pretcode;
+	struct rt_ucontext	uc;
+	struct rt_siginfo	info;
+
+	/* fp state follows here */
+};
+
+#endif
diff --git a/include/restorer.h b/include/restorer.h
index a603b4d..7548ae1 100644
--- a/include/restorer.h
+++ b/include/restorer.h
@@ -131,72 +131,6 @@ struct task_restore_core_args {
 	int				rst_tcp_socks_size;
 } __aligned(sizeof(long));
 
-struct pt_regs {
-	unsigned long	r15;
-	unsigned long	r14;
-	unsigned long	r13;
-	unsigned long	r12;
-	unsigned long	bp;
-	unsigned long	bx;
-
-	unsigned long	r11;
-	unsigned long	r10;
-	unsigned long	r9;
-	unsigned long	r8;
-	unsigned long	ax;
-	unsigned long	cx;
-	unsigned long	dx;
-	unsigned long	si;
-	unsigned long	di;
-	unsigned long	orig_ax;
-
-	unsigned long	ip;
-	unsigned long	cs;
-	unsigned long	flags;
-	unsigned long	sp;
-	unsigned long	ss;
-};
-
-struct rt_sigcontext {
-	unsigned long			r8;
-	unsigned long			r9;
-	unsigned long			r10;
-	unsigned long			r11;
-	unsigned long			r12;
-	unsigned long			r13;
-	unsigned long			r14;
-	unsigned long			r15;
-	unsigned long			rdi;
-	unsigned long			rsi;
-	unsigned long			rbp;
-	unsigned long			rbx;
-	unsigned long			rdx;
-	unsigned long			rax;
-	unsigned long			rcx;
-	unsigned long			rsp;
-	unsigned long			rip;
-	unsigned long			eflags;
-	unsigned short			cs;
-	unsigned short			gs;
-	unsigned short			fs;
-	unsigned short			__pad0;
-	unsigned long			err;
-	unsigned long			trapno;
-	unsigned long			oldmask;
-	unsigned long			cr2;
-	void				*fpstate;;
-	unsigned long			reserved1[8];
-};
-
-struct rt_sigframe {
-	char			*pretcode;
-	struct rt_ucontext	uc;
-	struct rt_siginfo	info;
-
-	/* fp state follows here */
-};
-
-
 #define SHMEMS_SIZE	4096
 
 /*
-- 
1.7.10.4



More information about the CRIU mailing list