Subject: Re: wsevent cleanup
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Martin Husemann <martin@duskware.de>
List: tech-kern
Date: 02/06/2006 13:59:12
On Mon, Feb 06, 2006 at 01:31:00PM +0100, Julio M. Merino Vidal wrote:
> I didn't do this because, some times, you want to inject more than one
> event at once (strictly speaking, only the code I added yesterday has
> this behavior... but am now thinking that the event processing code in
> wsmouse could also use this to do everything atomically).  In such case,
> you'd be checking first if there is room for two elements and then, each
> inject could redo the check to see if there is room for one element.

Well, that sounds ok to me (we are talking about mouse/keyboard events
here, not network packets - so duplicating a simple check now and then
is not that bad).

But the obvious other solution (no idea how handy that gets for the callers
you have in mind): allow multiple events being passed to the _inject function
in a single call.

Martin