Re: [PATCH xf86-video-qxl 2/4 v2] Only watch the uinput channel when an agent is connected.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 20, 2015 at 10:08:49AM -0500, Jeremy White wrote:
> On 10/20/2015 07:14 AM, Christophe Fergeau wrote:
> > On Mon, Oct 19, 2015 at 02:33:56PM -0500, Jeremy White wrote:
> >> Otherwise, you constantly spin loop, getting a return code of 0, 
> >> and pegging CPU usage at 100%.
> >> 
> >> Signed-off-by: Jeremy White <jwhite@xxxxxxxxxxxxxxx> --- 
> >> src/spiceqxl_uinput.c  | 13 ++++++++++++- src/spiceqxl_uinput.h
> >> |  1 + src/spiceqxl_vdagent.c |  2 ++ 3 files changed, 15
> >> insertions(+), 1 deletion(-)
> >> 
> >> diff --git a/src/spiceqxl_uinput.c b/src/spiceqxl_uinput.c index
> >> 1e61907..38ed2ed 100644 --- a/src/spiceqxl_uinput.c +++
> >> b/src/spiceqxl_uinput.c @@ -121,6 +121,17 @@ void
> >> spiceqxl_uinput_init(qxl_screen_t *qxl) uinput_filename,
> >> strerror(errno)); return; } -    qxl->core->watch_add(uinput_fd,
> >> SPICE_WATCH_EVENT_READ, spiceqxl_uinput_read_cb, qxl); 
> >> spice_server_set_agent_mouse(qxl->spice_server, 1); } + +void
> >> spiceqxl_uinput_watch(qxl_screen_t *qxl, Bool on) +{ +    static
> >> SpiceWatch *handle = NULL;
> > 
> > I would store this field in qxl_screen_t.
> > 
> > Looks good otherwise, ACK
> 
> This file uses static variables as it's storage mechanism; I'd rather
> not change that (at least not in this patch :-/).  I will move the
> static up to group with the other statics so it's more obvious that
> they are, collectively, evil.

Hmm, did not look where the other variables were coming from. Since
uinput_fd is already a static and is used in the function you added,
reluctant ACK.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]