> From: Keith Packard <kei...@keithp.com>
> Date: Wed, 09 Dec 2015 16:04:08 -0800
> 
> >> +extern _X_EXPORT pthread_mutex_t input_mutex;
> >> +extern _X_EXPORT __thread int input_mutex_count;
> >> +
> > Are these really meant to be exported - a wild guess will be that the
> > input drivers won't need access to these ?
> 
> Turns out they do - evdev needs to grab the input lock to handle button
> emulation via a timer.

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?

Also, using TLS (i.e. __thread variables) isn't portable.  That
mechanism certainly isn't supported by all platforms supported by
Xorg.
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to