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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 19/47] Rework loadvm path for subloops
Date: Sat, 04 Oct 2014 18:46:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto:
>  
> +/* These are ORable flags */

... make them an "enum".

> +const int LOADVM_EXITCODE_QUITLOOP     =  1;
> +const int LOADVM_EXITCODE_QUITPARENT   =  2;

LOADVM_QUIT_ALL, LOADVM_QUIT respectively?

> +const int LOADVM_EXITCODE_KEEPHANDLERS =  4;
> +

Is it more common to drop or keep handlers?

In either case, please add a comment to the three constants that details
how to use them.  In particular, please document why you should drop
(resp. keep) handlers...

Is it by chance that they are only used in savevm.c?  Should they be
moved to a header file?

> 
> +    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.

Paolo



reply via email to

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