diff options
author | Peter Xu | 2017-09-21 08:35:52 +0200 |
---|---|---|
committer | Paolo Bonzini | 2017-09-22 21:07:27 +0200 |
commit | 95eeeba669dca94492d708b2893f296839652c84 (patch) | |
tree | 0ec11df27cba0c98c5d3a37172e1f069b2bae12f /include/chardev | |
parent | chardev: new qemu_chr_be_update_read_handlers() (diff) | |
download | qemu-95eeeba669dca94492d708b2893f296839652c84.tar.gz qemu-95eeeba669dca94492d708b2893f296839652c84.tar.xz qemu-95eeeba669dca94492d708b2893f296839652c84.zip |
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 <peterx@redhat.com>
Message-Id: <1505975754-21555-3-git-send-email-peterx@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/chardev')
-rw-r--r-- | include/chardev/char.h | 1 |
1 files changed, 1 insertions, 0 deletions
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); }; |