[PATCH 0/3] Make timers even more resistant to signals
Keith Packard
keithp at keithp.com
Tue Oct 2 23:21:22 PDT 2012
Peter Hutterer <peter.hutterer at who-t.net> writes:
> A quick git grep shows that timers are used in keybard, mouse, joystick,
> synaptics, and wacom, all of those are in the signal path. We could in
> theory fix up the lot, but it will take time.
Thanks for checking; it seems like the server really needs to provide a
signal-safe function. At a minimum, we need a function that requires
that the timer have been registered so that it won't call malloc if the
driver messes up.
Beyond that, having a function which stashed the timer changes away in
the existing timer structure and signaled the server code to go and fix
things from the main thread seems pretty simple to add, and that would
avoid needing to block signals within WaitForSomething. Yes, we have a
race there between checking the variable and blocking in select, but
blocking SIGIO won't fix that; we have to unblock before select.
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20121002/ee637e8a/attachment-0001.pgp>
More information about the xorg-devel
mailing list