[PATCH xserver 6/9] mi: Grow event queue while reading events
Keith Packard
keithp at keithp.com
Thu Dec 17 22:46:27 PST 2015
Peter Hutterer <peter.hutterer at who-t.net> writes:
> we should really move that lot into a helper function...
Well, now that growing the queue happens while queuing events, we might
just remove it entirely. Unless we run out of memory, it'll never happen
now.
>> -
>> - return;
>> + oldtail = miEventQueue.tail;
>
> this assignment has no effect
I think you're mistaken. mieqGrowQueue reallocates the queue and moves
all of the events to the first elements in the new queue. At the end of
that function, it does:
/* And update our record */
eventQueue->tail = n_enqueued;
eventQueue->head = 0;
If we don't update 'oldtail', then we will wreck the event queue.
> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> otherwise
Thanks, I'll pend putting this in the patch until we've settled on the
oldtail stuff; that seems important.
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20151217/bbedb893/attachment.sig>
More information about the xorg-devel
mailing list