[PATCH libinput 1/9] evdev: Dynamically allocate slot array

Peter Hutterer peter.hutterer at who-t.net
Wed Apr 9 22:15:39 PDT 2014


On Wed, Apr 09, 2014 at 08:33:34PM +0100, Daniel Stone wrote:
> Hi,
> 
> On 9 April 2014 20:02, Jonas Ådahl <jadahl at gmail.com> wrote:
> 
> > Don't have a hard coded (previously 16) slot array size; instead
> > allocate dynamically depending what slots are assigned. There is still a
> > hard coded max though, to protect from invalid input, but its changed
> > to 60.
> >
> 
> Won't this break xf86-input-libinput, which processes events inside a
> signal handler, and thus can't use malloc()?

it doesn't use SIGIO because that doesn't seem to work on an epollfd.
And the epollfd is the only one we expose to the clients.

I haven't had the time to dig further but that seems to be the gist of it,
fcntl(O_ASYNC) and fcntl(F_SETOWN) both succeed but that's the end of it, no
signal is ever triggered. A quick glimpse of the kernel seems to verify that
epoll doesn't do SIGIO.

I suspect what we need here is set it on the fd of the device itself but we
don't have an API to expose that at this point.

Cheers,
   Peter


More information about the wayland-devel mailing list