|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 1/9] main-loop: introduce a main_loop_quit() function |
Date: | Wed, 20 Feb 2013 16:36:07 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |