qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Thomas Huth" <thuth@redhat.com>,
	"Michal Suchánek" <msuchanek@suse.de>,
	qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] sane char device writes?
Date: Fri, 25 Nov 2016 17:16:39 +0100	[thread overview]
Message-ID: <1d449991-25f2-aedf-01c7-6fd976c02f14@redhat.com> (raw)
In-Reply-To: <b6e37cc8-bcf8-6899-6771-c903663546f5@redhat.com>



On 24/11/2016 08:51, Thomas Huth wrote:
> > So for this to work an extra buffer would have to be stored in gtk.c
> > somewhere, and possibly similar timer trick used as in console.c
> > 
> > Any ideas how to do this without introducing too much insanity?
> >
> > Presumably using a GTK timer for repeating gd_vc_in the handler would
> > run in the same GTK UI thread as the "commit" signal handler and
> > excessive locking would not be required.
> > 
> > The data passed to gd_vc_in is presumably freed when it ends so it
> > would have to be copied somewhere. It's quite possible to create a
> > static list in gd_vc_in or some extra field in VirtualConsole.
>
> Not sure how the best solution should really look like, but Paolo
> suggested something here:
> 
> http://lists.gnu.org/archive/html/qemu-devel/2016-11/msg02222.html
> 
> ... so I'm putting him on CC: ... maybe he's got some spare minutes to
> elaborate on his idea.

My idea looks very much like Michal's.  I hadn't gone very much beyond
the "you need a buffer" step, but anyway you don't need a timer---you
can just record a chr_accept_input callback in gd_vc_handler.  It will
be called when the front-end is ready to get more characters.

Thanks,

Paolo

  reply	other threads:[~2016-11-25 16:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 18:09 [Qemu-devel] sane char device writes? Michal Suchánek
2016-11-24  7:51 ` Thomas Huth
2016-11-25 16:16   ` Paolo Bonzini [this message]
2016-11-28 15:53     ` Michal Suchánek
2016-11-28 16:00       ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1d449991-25f2-aedf-01c7-6fd976c02f14@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=msuchanek@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).