[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] sane char device writes?
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] sane char device writes? |
Date: |
Fri, 25 Nov 2016 17:16:39 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
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