[CRIU] [PATCH 03/13] parasite: Add [init|fini]_thread helpers

Cyrill Gorcunov gorcunov at openvz.org
Wed Nov 7 05:21:46 EST 2012


On Wed, Nov 07, 2012 at 02:07:46PM +0400, Pavel Emelyanov wrote:
> On 11/06/2012 08:53 PM, Cyrill Gorcunov wrote:
> > 
> > These helpers will be needed to save a blocked signals
> > mask for dumpee threads.
> > 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  include/parasite.h |    6 +++++
> >  parasite.c         |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 63 insertions(+), 0 deletions(-)
> > 
> 
> 
> > +struct parasite_thread_args {
> > +	pid_t			tid;
> > +};
> > +
> 
> I see not much sense in passing tid in args. Each thread may
> call sys_gettid himself.
> 
> > +static int fini_thread(struct parasite_thread_args *args)
> > +{
> > +	struct tid_state_s *s = find_thread_state(args->tid);
> 
> Don't initialize variable during declaration with the result of
> any call.

Well... ok, i'll update.


More information about the CRIU mailing list