[CRIU] [PATCH RESEND v1 45/55] pid: Add pid ns futex helper_created
Kirill Tkhai
ktkhai at virtuozzo.com
Fri Mar 24 08:16:08 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 65f471ab..dc8305a8 100644
--- a/criu/include/namespaces.h
+++ b/criu/include/namespaces.h
@@ -123,6 +123,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 a2e6b82c..61e264f8 100644
--- a/criu/namespaces.c
+++ b/criu/namespaces.c
@@ -312,6 +312,7 @@ struct ns_id *rst_new_ns_id(unsigned int id, pid_t pid,
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