chardev: add a note about frontend sources and context switch
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 6 Feb 2019 17:43:26 +0000 (18:43 +0100)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 13 Feb 2019 15:46:39 +0000 (16:46 +0100)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20190206174328.9736-5-marcandre.lureau@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
include/chardev/char-fe.h

index c1b7fd9a95a7839b67d7c7951566c1f876068515..aa1b864ccda472fff8af07dea27aff65973ab35e 100644 (file)
@@ -184,6 +184,9 @@ void qemu_chr_fe_printf(CharBackend *be, const char *fmt, ...)
  * is active; return the #GSource's tag.  If it is disconnected,
  * or without associated Chardev, return 0.
  *
+ * Note that you are responsible to update the front-end sources if
+ * you are switching the main context with qemu_chr_fe_set_handlers().
+ *
  * Returns: the source tag
  */
 guint qemu_chr_fe_add_watch(CharBackend *be, GIOCondition cond,