Revision 46481d39 vl.c
b/vl.c | ||
---|---|---|
1389 | 1389 |
|
1390 | 1390 |
} |
1391 | 1391 |
|
1392 |
static int vm_can_run(void) |
|
1392 |
#ifndef CONFIG_IOTHREAD |
|
1393 |
static int vm_request_pending(void) |
|
1393 | 1394 |
{ |
1394 |
return !(powerdown_requested ||
|
|
1395 |
reset_requested ||
|
|
1396 |
shutdown_requested ||
|
|
1397 |
debug_requested ||
|
|
1398 |
vmstop_requested);
|
|
1395 |
return powerdown_requested || |
|
1396 |
reset_requested || |
|
1397 |
shutdown_requested || |
|
1398 |
debug_requested || |
|
1399 |
vmstop_requested;
|
|
1399 | 1400 |
} |
1401 |
#endif |
|
1400 | 1402 |
|
1401 | 1403 |
qemu_irq qemu_system_powerdown; |
1402 | 1404 |
|
... | ... | |
1411 | 1413 |
qemu_main_loop_start(); |
1412 | 1414 |
|
1413 | 1415 |
for (;;) { |
1414 |
do { |
|
1415 | 1416 |
#ifndef CONFIG_IOTHREAD |
1416 |
nonblocking = cpu_exec_all();
|
|
1417 |
if (!vm_can_run()) {
|
|
1418 |
nonblocking = true;
|
|
1419 |
}
|
|
1417 |
nonblocking = cpu_exec_all(); |
|
1418 |
if (vm_request_pending()) {
|
|
1419 |
nonblocking = true; |
|
1420 |
} |
|
1420 | 1421 |
#endif |
1421 | 1422 |
#ifdef CONFIG_PROFILER |
1422 |
ti = profile_getclock();
|
|
1423 |
ti = profile_getclock(); |
|
1423 | 1424 |
#endif |
1424 |
main_loop_wait(nonblocking);
|
|
1425 |
main_loop_wait(nonblocking); |
|
1425 | 1426 |
#ifdef CONFIG_PROFILER |
1426 |
dev_time += profile_getclock() - ti;
|
|
1427 |
dev_time += profile_getclock() - ti; |
|
1427 | 1428 |
#endif |
1428 |
} while (vm_can_run()); |
|
1429 | 1429 |
|
1430 | 1430 |
if ((r = qemu_debug_requested())) { |
1431 | 1431 |
vm_stop(r); |
Also available in: Unified diff