[CRIU] [PATCH 1/3] pstree: don't include restorer.h in pstree.h

Andrew Vagin avagin at parallels.com
Thu Nov 7 03:53:36 PST 2013


On Thu, Nov 07, 2013 at 03:13:16PM +0400, Pavel Emelyanov wrote:
> On 11/06/2013 11:31 PM, Andrey Vagin wrote:
> 
> pstree.>>>>h<<<< ?

pstree.c

> 
> > Signed-off-by: Andrey Vagin <avagin at openvz.org>
> > ---
> >  include/restorer.h | 8 +-------
> >  include/rst_info.h | 7 +++++++
> >  pstree.c           | 1 -
> >  3 files changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/include/restorer.h b/include/restorer.h
> > index 3b83d81..8509da9 100644
> > --- a/include/restorer.h
> > +++ b/include/restorer.h
> > @@ -12,6 +12,7 @@
> >  #include "lock.h"
> >  #include "util.h"
> >  #include "asm/restorer.h"
> > +#include "rst_info.h"
> >  
> >  #include "posix-timer.h"
> >  #include "shmem.h"
> > @@ -169,13 +170,6 @@ enum {
> >  	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) ({				\
> >  		futex_dec_and_wake(&task_entries->nr_in_progress);	\
> >  		futex_wait_while(&task_entries->start, __stage);	\
> > diff --git a/include/rst_info.h b/include/rst_info.h
> > index 38d7737..fa2c5a5 100644
> > --- a/include/rst_info.h
> > +++ b/include/rst_info.h
> > @@ -4,6 +4,13 @@
> >  #include "lock.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 {
> >  	int			nr;		/* How many tasks share this fd table */
> >  	pid_t			pid;		/* Who should restore this fd table */
> > diff --git a/pstree.c b/pstree.c
> > index 36ae0d1..b83453f 100644
> > --- a/pstree.c
> > +++ b/pstree.c
> > @@ -4,7 +4,6 @@
> >  
> >  #include "cr_options.h"
> >  #include "pstree.h"
> > -#include "restorer.h"
> >  #include "util.h"
> >  #include "lock.h"
> >  #include "namespaces.h"
> > 
> 
> 


More information about the CRIU mailing list