[PATCH xserver 4/8] Create a threaded mechanism for input [v3]

Julien Cristau jcristau at debian.org
Fri Dec 11 00:29:51 PST 2015


On Thu, Dec 10, 2015 at 11:42:36 -0800, Keith Packard wrote:

> Mark Kettenis <mark.kettenis at xs4all.nl> writes:
> 
> > Ugh.  Exporting global variables as part of the ABI is generally not
> > such a good idea.  Perhaps it is better to use functions to acquire
> > and release the input mutex instead?
> 
> Yeah, the mutex isn't exactly performance critical.
> 
> > Also, using TLS (i.e. __thread variables) isn't portable.  That
> > mechanism certainly isn't supported by all platforms supported by
> > Xorg.
> 
> Ok, I've added support for pthread_setspecific/pthread_getspecific and
> made sure that works; I cannot test the autoconf bits (other than
> verifying that if I misspell '__thread' as '__tread' it fails as
> expected).
> 
You could maybe use
http://www.gnu.org/software/autoconf-archive/ax_tls.html for the
autoconf bits?

Cheers,
Julien


More information about the xorg-devel mailing list