[PATCH v2 00/14] Fix signal-unsafe logging
Jeremy Huddleston
jeremyhu at apple.com
Fri Apr 13 10:53:14 PDT 2012
On Apr 13, 2012, at 10:10 AM, Alan Coopersmith <alan.coopersmith at oracle.com> wrote:
> On 04/13/12 09:33 AM, Chase Douglas wrote:
>>> The X server must be using SigIO for some really good reasons, what are they?
>>
>> To reduce input visual latency. Signal handlers are run immediately when
>> the signal occurs. The process is interrupted no matter where it is,
>> including when it is 500 stack frames deep from the event loop.
>
> Whatever happened to Tiago's work to move that into a separate thread, which
> should be much less fragile than a signal handler? (Most of the Xserver is
> not thread-safe, but it's also not re-entrant for being called from a signal
> handler either, so either solution has to be very limited in what it calls.)
I remember asking Tiago about this maybe a year or so ago, and he said he was still having some problems when he abandoned it.
FWIW, XQuartz input is coming from a completely different thread (actually, a dispatch queue on systems with GCD), and it works without issue with some minimal locks of the mi event queue.
More information about the xorg-devel
mailing list