qemu-e2k/hw
Peter Xu 2c716ba150 chardev: introduce qemu_chr_timeout_add_ms()
It's a replacement of g_timeout_add[_seconds]() for chardevs.  Chardevs
now can have dedicated gcontext, we should always bind chardev tasks
onto those gcontext rather than the default main context.  Since there
are quite a few of g_timeout_add[_seconds]() callers, a new function
qemu_chr_timeout_add_ms() is introduced.

One thing to mention is that, terminal3270 is still always running on
main gcontext.  However let's convert that as well since it's still part
of chardev codes and in case one day we'll miss that when we move it out
of main gcontext too.

Also, convert all the timers from GSource tags into GSource pointers.
Gsource tag IDs and g_source_remove()s can only work with default
gcontext, while now these GSources can logically be attached to other
contexts.  So let's use explicit g_source_destroy() plus another
g_source_unref() to remove a timer.

Note: when in the timer handler, we don't need the g_source_destroy()
any more since that'll be done automatically if the timer handler
returns false (and that's what all the current handlers do).

Yet another note: in pty_chr_rearm_timer() we take special care for
ms=1000.  This patch merged the two cases into one.

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180104141835.17987-4-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-01-12 13:22:02 +01:00
..
9pfs 9pfs: deprecate handle backend 2018-01-08 11:18:23 +01:00
acpi hw/acpi: ACPI_PM_* defines are not restricted to i386 arch 2017-12-18 17:07:02 +03:00
adc
alpha hw/timer/mc146818: rename rtc_init() -> mc146818_rtc_init() 2017-12-18 17:07:02 +03:00
arm imx_fec: Do not link to netdev 2018-01-11 13:25:34 +00:00
audio misc: remove old i386 dependency 2017-12-18 17:07:02 +03:00
block nvme: Add tracing 2017-12-22 15:03:41 +01:00
bt
char chardev: introduce qemu_chr_timeout_add_ms() 2018-01-12 13:22:02 +01:00
core Pull request 2017-12-20 11:30:55 +00:00
cpu
cris
display sm501: Add some more unimplemented registers 2018-01-10 12:52:59 +11:00
dma sun4m: remove include/hw/sparc/sun4m.h and all references to it 2018-01-09 21:48:20 +00:00
gpio
i2c ppc4xx_i2c: Implement basic I2C functions 2018-01-10 12:52:59 +11:00
i386 pc: fail memory hot-plug/unplug with -no-acpi and Q35 machine type 2018-01-12 09:54:13 +01:00
ide hw/ide: Emulate SiI3112 SATA controller 2018-01-10 12:53:00 +11:00
input Split adb.c into adb.c, adb-mouse.c and adb-kbd.c 2017-12-21 20:11:28 +01:00
intc hw/intc/arm_gic: reserved register addresses are RAZ/WI 2018-01-11 13:25:40 +00:00
ipack
ipmi hw/ipmi: remove old i386 dependency 2017-12-18 17:07:02 +03:00
isa hw/timer/mc146818: rename rtc_init() -> mc146818_rtc_init() 2017-12-18 17:07:02 +03:00
lm32
m68k
mem
microblaze
mips hw/mips/boston: Remove workaround for writes to ROM aborting 2017-12-21 09:30:32 +01:00
misc dump-guest-memory.py: fix "You can't do that without a process to debug" 2018-01-02 14:49:54 +01:00
moxie hw/moxie/moxiesim: Add support for loading a BIOS on moxiesim 2017-12-21 09:30:31 +01:00
net imx_fec: Reserve full FSL_IMX25_FEC_SIZE page for the register file 2018-01-11 13:25:38 +00:00
nios2
nvram
openrisc
pci
pci-bridge misc: remove old i386 dependency 2017-12-18 17:07:02 +03:00
pci-host sun4u: split IOMMU device out from apb.c to sun4u_iommu.c 2018-01-09 21:48:20 +00:00
pcmcia
ppc spapr: Correct compatibility mode setting for hotplugged CPUs 2018-01-10 12:53:00 +11:00
s390x
scsi scsi-generic: Add share-rw option 2018-01-12 09:54:12 +01:00
sd hw/sd/pxa2xx_mmci: add read/write() trace events 2018-01-11 13:25:39 +00:00
sh4
smbios
sparc sun4m: remove include/hw/sparc/sun4m.h and all references to it 2018-01-09 21:48:20 +00:00
sparc64 sun4u_iommu: add trace event for IOMMU translations 2018-01-09 21:48:20 +00:00
ssi hw/ssi/aspeed_smc: remove unused #include 2017-12-18 17:07:02 +03:00
timer hpet: recover timer offset correctly 2018-01-12 13:22:02 +01:00
tpm tpm: Implement tpm_sized_buffer_reset 2017-12-22 09:01:09 -05:00
tricore
unicore32 hw/unicore32: restrict hw addr defines to source file 2017-12-18 17:07:02 +03:00
usb dev-storage: Fix the unusual function name 2017-12-19 10:25:08 +00:00
vfio
virtio hw/virtio-balloon: remove old i386 dependency 2017-12-18 17:07:02 +03:00
watchdog misc: drop old i386 dependency 2017-12-18 17:07:03 +03:00
xen
xenpv
xtensa
Makefile.objs