mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-06 06:27:41 -07:00
Merge remote branch 'origin/master' into pci
Conflicts: Makefile.objs hw/virtio.c
This commit is contained in:
commit
c924f36a30
123 changed files with 2984 additions and 1199 deletions
18
vl.c
18
vl.c
|
|
@ -158,6 +158,7 @@ int main(int argc, char **argv)
|
|||
|
||||
#include "slirp/libslirp.h"
|
||||
|
||||
#include "trace.h"
|
||||
#include "qemu-queue.h"
|
||||
#include "cpus.h"
|
||||
#include "arch_init.h"
|
||||
|
|
@ -1074,6 +1075,8 @@ void vm_state_notify(int running, int reason)
|
|||
{
|
||||
VMChangeStateEntry *e;
|
||||
|
||||
trace_vm_state_notify(running, reason);
|
||||
|
||||
for (e = vm_change_state_head.lh_first; e; e = e->entries.le_next) {
|
||||
e->cb(e->opaque, running, reason);
|
||||
}
|
||||
|
|
@ -1249,16 +1252,17 @@ void main_loop_wait(int nonblocking)
|
|||
IOHandlerRecord *pioh;
|
||||
|
||||
QLIST_FOREACH_SAFE(ioh, &io_handlers, next, pioh) {
|
||||
if (!ioh->deleted && ioh->fd_read && FD_ISSET(ioh->fd, &rfds)) {
|
||||
ioh->fd_read(ioh->opaque);
|
||||
}
|
||||
if (!ioh->deleted && ioh->fd_write && FD_ISSET(ioh->fd, &wfds)) {
|
||||
ioh->fd_write(ioh->opaque);
|
||||
}
|
||||
|
||||
/* Do this last in case read/write handlers marked it for deletion */
|
||||
if (ioh->deleted) {
|
||||
QLIST_REMOVE(ioh, next);
|
||||
qemu_free(ioh);
|
||||
continue;
|
||||
}
|
||||
if (ioh->fd_read && FD_ISSET(ioh->fd, &rfds)) {
|
||||
ioh->fd_read(ioh->opaque);
|
||||
}
|
||||
if (ioh->fd_write && FD_ISSET(ioh->fd, &wfds)) {
|
||||
ioh->fd_write(ioh->opaque);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue