[CRIU] [PATCH v2 45/57] pid: Add pid ns futex helper_created
Kirill Tkhai
ktkhai at virtuozzo.com
Tue Mar 28 08:40:49 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 80b36575..1cc47023 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 8fd2a7d0..4a3c29c1 100644
--- a/criu/namespaces.c
+++ b/criu/namespaces.c
@@ -317,6 +317,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