[CRIU] [PATCH 06/10] pstree: Introduce item's dump info

Pavel Emelyanov xemul at parallels.com
Mon Sep 29 11:04:52 PDT 2014


Empty for now, will be filled soon.

Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
 include/pstree.h | 8 ++++++++
 pstree.c         | 6 +++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/pstree.h b/include/pstree.h
index 090f272..d21a884 100644
--- a/include/pstree.h
+++ b/include/pstree.h
@@ -36,6 +36,14 @@ static inline struct rst_info *rsti(struct pstree_item *i)
 	return (struct rst_info *)(i + 1);
 }
 
+struct dmp_info {
+};
+
+static inline struct dmp_info *dmpi(struct pstree_item *i)
+{
+	return (struct dmp_info *)(i + 1);
+}
+
 /* ids is alocated and initialized for all alive tasks */
 static inline int shared_fdtable(struct pstree_item *item)
 {
diff --git a/pstree.c b/pstree.c
index 0754ed9..6bcfd91 100644
--- a/pstree.c
+++ b/pstree.c
@@ -162,14 +162,14 @@ void free_pstree(struct pstree_item *root_item)
 struct pstree_item *__alloc_pstree_item(bool rst)
 {
 	struct pstree_item *item;
+	int sz;
 
 	if (!rst) {
-		item = xzalloc(sizeof(*item));
+		sz = sizeof(*item) + sizeof(struct dmp_info);
+		item = xzalloc(sz);
 		if (!item)
 			return NULL;
 	} else {
-		int sz;
-
 		sz = sizeof(*item) + sizeof(struct rst_info);
 		item = shmalloc(sz);
 		if (!item)
-- 
1.8.4.2




More information about the CRIU mailing list