Commit cc4a922e authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

pstree: don't include restorer.h in pstree.c

restorer.h includes about 20 headers. Any changes in these headers
provoke to recompilation of pstree.c.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 254342be
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "lock.h" #include "lock.h"
#include "util.h" #include "util.h"
#include "asm/restorer.h" #include "asm/restorer.h"
#include "rst_info.h"
#include "posix-timer.h" #include "posix-timer.h"
#include "shmem.h" #include "shmem.h"
...@@ -169,13 +170,6 @@ enum { ...@@ -169,13 +170,6 @@ enum {
CR_STATE_COMPLETE CR_STATE_COMPLETE
}; };
struct task_entries {
int nr_threads, nr_tasks, nr_helpers;
futex_t nr_in_progress;
futex_t start;
mutex_t zombie_lock;
};
#define restore_finish_stage(__stage) ({ \ #define restore_finish_stage(__stage) ({ \
futex_dec_and_wake(&task_entries->nr_in_progress); \ futex_dec_and_wake(&task_entries->nr_in_progress); \
futex_wait_while(&task_entries->start, __stage); \ futex_wait_while(&task_entries->start, __stage); \
......
...@@ -4,6 +4,13 @@ ...@@ -4,6 +4,13 @@
#include "lock.h" #include "lock.h"
#include "list.h" #include "list.h"
struct task_entries {
int nr_threads, nr_tasks, nr_helpers;
futex_t nr_in_progress;
futex_t start;
mutex_t zombie_lock;
};
struct fdt { struct fdt {
int nr; /* How many tasks share this fd table */ int nr; /* How many tasks share this fd table */
pid_t pid; /* Who should restore this fd table */ pid_t pid; /* Who should restore this fd table */
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "cr_options.h" #include "cr_options.h"
#include "pstree.h" #include "pstree.h"
#include "restorer.h"
#include "util.h" #include "util.h"
#include "lock.h" #include "lock.h"
#include "namespaces.h" #include "namespaces.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment