summaryrefslogtreecommitdiffstats
path: root/include/char
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-03-05 23:21:23 +0530
committerAnthony Liguori <aliguori@us.ibm.com>2013-03-08 13:57:15 -0600
commit23673ca740e0eda66901ca801a5a901df378b063 (patch)
treebe62ffa43f5d182d2925bc6dfddc416670e53a1b /include/char
parent2ea5a7af7bfa576a5936400ccca4144caca9640b (diff)
downloadhqemu-23673ca740e0eda66901ca801a5a901df378b063.zip
hqemu-23673ca740e0eda66901ca801a5a901df378b063.tar.gz
qemu-char: add watch support
This allows a front-end to request for a callback when the backend is writable again. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Message-id: 96f93c0f741064604bbb6389ce962191120af8b7.1362505276.git.amit.shah@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include/char')
-rw-r--r--include/char/char.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/char/char.h b/include/char/char.h
index c91ce3c..09ac401 100644
--- a/include/char/char.h
+++ b/include/char/char.h
@@ -56,6 +56,7 @@ typedef void IOEventHandler(void *opaque, int event);
struct CharDriverState {
void (*init)(struct CharDriverState *s);
int (*chr_write)(struct CharDriverState *s, const uint8_t *buf, int len);
+ GSource *(*chr_add_watch)(struct CharDriverState *s, GIOCondition cond);
void (*chr_update_read_handler)(struct CharDriverState *s);
int (*chr_ioctl)(struct CharDriverState *s, int cmd, void *arg);
int (*get_msgfd)(struct CharDriverState *s);
@@ -152,6 +153,9 @@ void qemu_chr_fe_close(struct CharDriverState *chr);
void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
GCC_FMT_ATTR(2, 3);
+guint qemu_chr_fe_add_watch(CharDriverState *s, GIOCondition cond,
+ GIOFunc func, void *user_data);
+
/**
* @qemu_chr_fe_write:
*
OpenPOWER on IntegriCloud