to thread the X server (?)

Peter Hutterer peter at cs.unisa.edu.au
Thu Jun 19 05:16:31 PDT 2008


On Tue, Jun 17, 2008 at 08:42:22PM -0300, Tiago Vignatti wrote:
> Now I am pondering the following:
> Model one:
> thread #1 deals with
>      - injection and processing of input events
> thread #2 deals with
>      - requests from known clients
>      - new client that tries to connect

> Model two:
> thread #1 deals with
>      - injection of input events from devices
> thread #2 deals with
>      - processing of input events to clients
> thread #3 deals with
>      - requests from known clients
>      - new client that tries to connect

I'm pretty sure you are aware of this but some requests change the state of
input devices and thus need to be properly synchronised with the processing
thread.
XChangeDeviceHierarchy, XSetDeviceMode, and even more subtle things like
changing the ClientPointer come to my mind here.

> 
> The thing that most pissing me off is how gdb sucks to debug the server. 
> I’m using the last version of gdb (6.8 version and from today’s 
> snapshot) and it often hard lock my machine (I’m sure I had to reboot my 
> machine a least 20 times today... sigh.) Sometimes it consumes 99% of 
> CPU and sometimes it completely hangs my machine. Yes, this is really 
> boring. Anyone knows some magic parameters in gdb to avoid this hard 
> lock up? Anyway, the goal for long term is to let an option — at 
> compilation time — to not use the input thread.

yes! please leave the single-threaded option in! gdb can be painful at times
even without threads.

Cheers,
  Peter



More information about the xorg mailing list