[CRIU] [PATCH v4 28/41] pid: Add pid ns futex helper_created

Kirill Tkhai ktkhai at virtuozzo.com
Thu May 4 09:09:52 PDT 2017


This futex is need to notify waiter, that ns has created

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/include/namespaces.h |    1 +
 criu/namespaces.c         |    1 +
 2 files changed, 2 insertions(+)

diff --git a/criu/include/namespaces.h b/criu/include/namespaces.h
index b126bed2c..37b65b0db 100644
--- a/criu/include/namespaces.h
+++ b/criu/include/namespaces.h
@@ -153,6 +153,7 @@ struct ns_id {
 		struct {
 			struct rb_root rb_root;
 			int nsfd_id;
+			futex_t helper_created;
 		} pid;
 	};
 };
diff --git a/criu/namespaces.c b/criu/namespaces.c
index 4dd2377fc..f07860582 100644
--- a/criu/namespaces.c
+++ b/criu/namespaces.c
@@ -313,6 +313,7 @@ struct ns_id *rst_new_ns_id(unsigned int id, pid_t pid,
 		} else if (nd == &pid_ns_desc) {
 			nsid->pid.rb_root = RB_ROOT;
 			nsid->pid.nsfd_id = -1;
+			futex_init(&nsid->pid.helper_created);
 		}
 	}
 



More information about the CRIU mailing list