[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 11 of 15] xenpaging: improve mainloop exit handling
# HG changeset patch # User Olaf Hering <olaf@xxxxxxxxx> # Date 1319189039 -7200 # Node ID 1f9a27425952493878a54c82e0518b47560161af # Parent 0b7d7a2bd6673f358faf0183b79b29e6a2f036a5 xenpaging: improve mainloop exit handling Remove the if/else logic to exit from the in case a signal arrives. Update comments. Signed-off-by: Olaf Hering <olaf@xxxxxxxxx> diff -r 0b7d7a2bd667 -r 1f9a27425952 tools/xenpaging/xenpaging.c --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -806,7 +806,7 @@ int main(int argc, char *argv[]) } } - /* Write all pages back into the guest */ + /* If interrupted, write all pages back into the guest */ if ( interrupted == SIGTERM || interrupted == SIGINT ) { /* If no more pages to process, exit loop. */ @@ -815,13 +815,15 @@ int main(int argc, char *argv[]) /* One more round if there are still pages to process. */ resume_pages(paging, paging->num_paged_out); + + /* Resume main loop */ + continue; } - else - { - /* Exit on any other signal */ - if ( interrupted ) - break; - } + + /* Exit main loop on any other signal */ + if ( interrupted ) + break; + } DPRINTF("xenpaging got signal %d\n", interrupted); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |