[Mesa-dev] threads and X.org/AIGLX drivers

Alan Coopersmith alan.coopersmith at oracle.com
Wed May 11 08:14:54 PDT 2011

On 05/10/11 11:53 PM, Dave Airlie wrote:
> The problem appears to be that we are using llvmpipe as our swrast
> renderer and on systems that fallback to that we end up with threads
> inside the X server, that we didn't spawn. It appears SIGIO gets
> delivered to one of these threads while the main thread keeps on
> trucking and fail ensues.

I wasn't around when you were asking on IRC last night, but we do have
a driver that uses threads (required by the API to get ACPI events from
our kernel unfortunately) and it had similar problems, including crashes
in places like ATIMach64SetCursorPosition when that thread that caught SIGIO
for a mouse event, processed down to the point that it tried to do an outb,
but didn't have IOPL privilege, since that's set per-thread on Solaris.

The fix it used was xf86BlockSIGIO() before starting the thread, and
then unblocking only in the main thread afterwards:


	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System

More information about the mesa-dev mailing list