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

Keith Packard keithp at keithp.com
Thu Dec 10 07:18:23 PST 2015


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, it's not a performance sensitive operation, so hiding the globals
in a function is a good idea. I'll leave the stub versions as static
inline so I don't have to move them to the new file (inputthread.c)
later, just redefine them in the header file.

> Also, using TLS (i.e. __thread variables) isn't portable.  That
> mechanism certainly isn't supported by all platforms supported by
> Xorg.

I can add some autoconf magic to autodetect whether this is supported
and disable threaded input where it isn't.

Thanks for your comments.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20151210/351126d9/attachment.sig>


More information about the xorg-devel mailing list