qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 19/47] Rework loadvm path for subloops


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH v4 19/47] Rework loadvm path for subloops
Date: Tue, 7 Oct 2014 11:21:26 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

* Paolo Bonzini (address@hidden) wrote:
> Il 07/10/2014 10:58, Dr. David Alan Gilbert ha scritto:
> > 
> >>> > > +    if (exitcode & LOADVM_EXITCODE_QUITPARENT) {
> >>> > > +        DPRINTF("loadvm_handlers_state_main: End of loop with 
> >>> > > QUITPARENT");
> >>> > > +        exitcode &= ~LOADVM_EXITCODE_QUITPARENT;
> >>> > > +        exitcode &= LOADVM_EXITCODE_QUITLOOP;
> >> > 
> >> > Either you want |=, or the first &= is useless.
> > Ooh nicely spotted; yes that should be |=  - now I need to figure out why 
> > this
> > didn't break things.
> > 
> > The idea is we have:
> >  1   outer loadvm_state loop
> >  2      receives packaged command
> >  3        inner_loadvm_state loop
> >  4          receives handle_listen
> >  5          < QUITPARENT
> >  6        < QUITLOOP
> >  7       < QUITLOOP
> >  8   exits
> > 
> > so QUITPARENT causes it's parent to exit, and to do that
> > the inner loop transforms QUITPARENT into QUITLOOP as it's
> > exit.
> 
> Yes, that was my understanding as well.
> 
> We have only two nested loops, but if we had three, should it be
> QUIT_PARENT or QUIT_ALL?

The answer probably depends on why you've got 3 nested loops; either
way is a bit of guesswork about what some potential future user
wants to do.

Dave

--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]