Subject: Re: wsevent cleanup
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-kern
Date: 02/06/2006 23:08:14
El 06/02/2006, a las 21:41, YAMAMOTO Takashi escribi=F3:
>>>> - Add two new functions, wsevent_free and wsevent_inject. The =20
>>>> former
>>>> returns the amount of free space in the queue and the latter =20
>>>> adds a
>>>> new event to it. The latter assumes that the queue has at least
>>>> one
>>>> free slot.
>>>
>>> I think wseevent_free is a poor name (sonds like the free you do
>>> after malloc).
>>> Maybe wsevent_available()?
>>
>> Excellent. I also thought that free was inappropriate but couldn't
>> think of a better name :-)
>
> to me, "inject" also sounds weird, given that what it does is
> the opposite of read. i'd suggest enqueue or write.
inject is currently used in other code, such as wsdisplay_stat_inject
or some other function in wscons (I think it's in wskbd, but can't
check now).
But indeed, it should be _write for consistency.
> there is very old patch which does something similar.
> http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=3D12132
Hmmm, 3 button emulation. Do you mind if I assign that PR to myself?
I was thinking to add such feature and some initial code could help.
--=20
Julio M. Merino Vidal <jmmv84@gmail.com>
The Julipedia - http://julipedia.blogspot.com/