On Mon, 4 Jun 2018 22:06:35 -0300 Eduardo Habkost <ehabk...@redhat.com> wrote:
> On Mon, Jun 04, 2018 at 05:01:11PM +0200, Igor Mammedov wrote: > [...] > > I'd prefer your patch, as it doesn't break error handling, > > or maybe even shorter version which keeps state transitions in one place: > > > > diff --git a/vl.c b/vl.c > > index c4fe255..fa44138 100644 > > --- a/vl.c > > +++ b/vl.c > > @@ -1956,7 +1956,7 @@ static void main_loop(void) > > #ifdef CONFIG_PROFILER > > int64_t ti; > > #endif > > - do { > > + while (!main_loop_should_exit()) { > > #ifdef CONFIG_PROFILER > > ti = profile_getclock(); > > #endif > > @@ -1964,7 +1964,7 @@ static void main_loop(void) > > #ifdef CONFIG_PROFILER > > dev_time += profile_getclock() - ti; > > #endif > > - } while (!main_loop_should_exit()); > > + } > > } > > Would this also fix the bug mentioned at: > "vl.c: make default main_loop_wait() timeout independed of slirp"? > it would mask it, I'd apply slirp fix as well while we have a reason to clean it up