diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2012-10-12 09:52:49 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2012-10-31 22:20:44 +0100 |
commit | ac4119c023c72b15f54238af43e4a178fcf41494 (patch) | |
tree | 778fcc959169ae183facf791165fe456cfc8d1ba /qemu-char.h | |
parent | 40e3acc18f1c663ee8f0c981525316f864f7b8ea (diff) | |
download | qemu-ac4119c023c72b15f54238af43e4a178fcf41494.zip qemu-ac4119c023c72b15f54238af43e4a178fcf41494.tar.gz qemu-ac4119c023c72b15f54238af43e4a178fcf41494.tar.bz2 |
chardev: Use timer instead of bottom-half to postpone open event
As the block layer may decide to flush bottom-halfs while the machine is
still initializing (e.g. to read geometry data from the disk), our
postponed open event may be processed before the last frontend
registered with a muxed chardev.
Until the semantics of BHs have been clarified, use an expired timer to
achieve the same effect (suggested by Paolo Bonzini). This requires to
perform the alarm timer initialization earlier as otherwise timer
subsystem can be used before being ready.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'qemu-char.h')
-rw-r--r-- | qemu-char.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-char.h b/qemu-char.h index 486644b..297dd98 100644 --- a/qemu-char.h +++ b/qemu-char.h @@ -69,7 +69,7 @@ struct CharDriverState { void (*chr_guest_open)(struct CharDriverState *chr); void (*chr_guest_close)(struct CharDriverState *chr); void *opaque; - QEMUBH *bh; + QEMUTimer *open_timer; char *label; char *filename; int opened; |