[CRIU] [PATCH 38/44] cr-restore.c: introduced the macro core_get_tls to extract the thread TLS value from a thread core in a machine-independent way.

Alexander Kartashov alekskartashov at parallels.com
Mon Jan 7 10:05:07 EST 2013


Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
 arch/x86/include/asm/restore.h |    2 ++
 cr-restore.c                   |    1 +
 2 files changed, 3 insertions(+)

diff --git a/arch/x86/include/asm/restore.h b/arch/x86/include/asm/restore.h
index 08e3b4b..62faffa 100644
--- a/arch/x86/include/asm/restore.h
+++ b/arch/x86/include/asm/restore.h
@@ -15,4 +15,6 @@
 		       "g"(task_args)					\
 		     : "rsp", "rdi", "rsi", "rbx", "rax", "memory")
 
+#define core_get_tls(pcore, ptls)
+
 #endif
diff --git a/cr-restore.c b/cr-restore.c
index be6ab50..b248b00 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -1896,6 +1896,7 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core)
 		thread_args[i].ta		= task_args;
 		thread_args[i].gpregs		= *CORE_THREAD_INFO(tcore)->gpregs;
 		thread_args[i].clear_tid_addr	= CORE_THREAD_INFO(tcore)->clear_tid_addr;
+		core_get_tls(tcore, &thread_args[i].tls);
 
 		if (tcore->thread_core) {
 			thread_args[i].has_futex	= true;
-- 
1.7.10.4



More information about the CRIU mailing list