x11: Call XInitThreads()
authorChad Versace <chadversary@google.com>
Tue, 27 Dec 2016 21:47:33 +0000 (13:47 -0800)
committerChad Versace <chadversary@google.com>
Fri, 20 Jan 2017 23:22:11 +0000 (15:22 -0800)
commit5d11c9d2c03deb72ecca1a948ba369bbedfb9b21
treeefded6ded52eca95b35faa7e595b251438325e27
parente98444b9bf969fd4f8bb15b62200caacc1783f8b
x11: Call XInitThreads()

Because the X11 manual says we must.

From man:XInitThreads(3):

  The XInitThreads function initializes Xlib support for concurrent
  threads.  This function must be the first Xlib function
  a multi-threaded program calls, and it must complete before any other
  Xlib call is made.

Fixes crash in multithreaded test:

  Test case 'dEQP-EGL.functional.multithread.window_context'..
  [xcb] Unknown sequence number while processing queue
  [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
  [xcb] Aborting, sorry about that.
  deqp-egl: xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

Change-Id: Ib3b535cec8295e062994fd759ae083c78641cf13
framework/platform/X11/tcuX11Platform.cpp