qemu-devel
[Top][All Lists]
Advanced

[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: Mon, 28 Nov 2016 17:00:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0


On 28/11/2016 16:53, Michal Suchánek wrote:
>> > 
>> > 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.
> 
> Where will the characters come from, though? 

>From ui/gtk.c's own buffer.

> This might solve the console ui hack since it has a pipe buffer it can
> peek and read in pieces but the gtk ui gets a whole paste buffer in an
> event callback and has to handle it whole before it returns from the
> gtk event callback. Unless it stores the data that does not fit into
> the serial fifo somewhere it has to drop it on the floor or block.

Yes, gtk needs to have a buffer of its own (probably it should
dynamically allocate it too, so that it can grow and shrink and the
limit on the size can be higher).

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]