[CRIU] [PATCH 17/22] cr-dump.c: moved the function core_free_entry into the file arch/x86/crtools.c
Alexander Kartashov
alekskartashov at parallels.com
Thu Dec 27 01:51:08 EST 2012
Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
arch/x86/crtools.c | 23 +++++++++++++++++++++++
cr-dump.c | 22 ----------------------
2 files changed, 23 insertions(+), 22 deletions(-)
diff --git a/arch/x86/crtools.c b/arch/x86/crtools.c
index cbad5d2..ae7ccfd 100644
--- a/arch/x86/crtools.c
+++ b/arch/x86/crtools.c
@@ -243,3 +243,26 @@ int arch_alloc_thread_info(CoreEntry *core) {
err:
return 1;
}
+
+
+void core_entry_free(CoreEntry *core)
+{
+ if (core) {
+ if (core->thread_info) {
+ if (core->thread_info->fpregs) {
+ if (core->thread_info->fpregs->xsave)
+ xfree(core->thread_info->fpregs->xsave->ymmh_space);
+ xfree(core->thread_info->fpregs->xsave);
+ xfree(core->thread_info->fpregs->st_space);
+ xfree(core->thread_info->fpregs->xmm_space);
+ xfree(core->thread_info->fpregs->padding);
+ }
+ xfree(core->thread_info->gpregs);
+ xfree(core->thread_info->fpregs);
+ }
+ xfree(core->thread_info);
+ xfree(core->thread_core);
+ xfree(core->tc);
+ xfree(core->ids);
+ }
+}
diff --git a/cr-dump.c b/cr-dump.c
index 792957c..ecbb72d 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -694,28 +694,6 @@ static int dump_task_kobj_ids(pid_t pid, CoreEntry *core)
return 0;
}
-static void core_entry_free(CoreEntry *core)
-{
- if (core) {
- if (core->thread_info) {
- if (core->thread_info->fpregs) {
- if (core->thread_info->fpregs->xsave)
- xfree(core->thread_info->fpregs->xsave->ymmh_space);
- xfree(core->thread_info->fpregs->xsave);
- xfree(core->thread_info->fpregs->st_space);
- xfree(core->thread_info->fpregs->xmm_space);
- xfree(core->thread_info->fpregs->padding);
- }
- xfree(core->thread_info->gpregs);
- xfree(core->thread_info->fpregs);
- }
- xfree(core->thread_info);
- xfree(core->thread_core);
- xfree(core->tc);
- xfree(core->ids);
- }
-}
-
static CoreEntry *core_entry_alloc(int alloc_thread_info,
int alloc_tc,
int alloc_ids)
--
1.7.10.4
More information about the CRIU
mailing list