Il 20/02/2013 16:32, Anthony Liguori ha scritto:
> diff --git a/main-loop.c b/main-loop.c
> index 6f52ac3..d433c45 100644
> --- a/main-loop.c
> +++ b/main-loop.c
> @@ -392,6 +392,19 @@ static int os_host_main_loop_wait(uint32_t timeout)
>  }
>  #endif
>  
> +static bool do_main_loop_quit;
> +
> +bool main_loop_should_quit(void)
> +{
> +    return do_main_loop_quit;
> +}
> +
> +void main_loop_quit(void)
> +{
> +    do_main_loop_quit = true;
> +    qemu_notify_event();
> +}
> +
>  int main_loop_wait(int nonblocking)
>  {
>      int ret;

Why not keep this as main_loop_should_exit() in vl.c?

qemu-nbd.c for example has its own logic to exit the loop.

Paolo


Reply via email to