[CRIU] [PATCH 11/13] restore: Add restoration of the blocked threads signals from the image

Cyrill Gorcunov gorcunov at openvz.org
Wed Nov 7 07:32:09 EST 2012


On Wed, Nov 07, 2012 at 02:07:36PM +0400, Pavel Emelyanov wrote:
> On 11/06/2012 08:53 PM, Cyrill Gorcunov wrote:
> > 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  cr-restore.c       |    2 ++
> >  include/restorer.h |    3 +++
> >  restorer.c         |    3 +++
> >  3 files changed, 8 insertions(+), 0 deletions(-)
> > 
> 
> 
> > @@ -199,6 +199,9 @@ static int restore_thread_common(struct rt_sigframe *sigframe,
> >  		}
> >  	}
> >  
> > +	if (args->has_blk_sigset)
> > +		sigframe->uc.uc_sigmask.sig[0] = args->blk_sigset;
> > +
> >  	restore_sched_info(&args->sp);
> >  
> >  	return restore_gpregs(sigframe, &args->gpregs);
> 
> This should either be in thread-specific code, or the blk_sigset should be accepted
> as function argument. The latter looks more reasonable to me.

OK, i must admit I don't get it. The restore_thread_common is already is thread
specific code, and @blk_sigset is sitting in thread_restore_args structure, what
the point to introduce another level of abstraction and pass it as function
argument? Frankly, it's restorer code which is supposed to be as small as
possible.


More information about the CRIU mailing list