From ac4119c023c72b15f54238af43e4a178fcf41494 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Fri, 12 Oct 2012 09:52:49 +0200 Subject: 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 --- qemu-char.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qemu-char.h') 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; -- cgit v1.1