From 95eeeba669dca94492d708b2893f296839652c84 Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Thu, 21 Sep 2017 14:35:52 +0800 Subject: chardev: add Chardev.gcontext field It caches the gcontext that is used to poll the chardev IO. Before this patch, we only passed it in via chr_update_read_handlers(). However that may not be enough if the char backend is disconnected and reconnected afterward. There are chardev codes that still assumed the context be NULL (which is the main context). Will fix that up in following up patches. Signed-off-by: Peter Xu Message-Id: <1505975754-21555-3-git-send-email-peterx@redhat.com> Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- include/chardev/char.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/chardev/char.h b/include/chardev/char.h index 2068ea496d..84fb773591 100644 --- a/include/chardev/char.h +++ b/include/chardev/char.h @@ -55,6 +55,7 @@ struct Chardev { int logfd; int be_open; GSource *gsource; + GMainContext *gcontext; DECLARE_BITMAP(features, QEMU_CHAR_FEATURE_LAST); }; -- cgit v1.2.3-55-g7522