x11: Call XInitThreads() am: 5d11c9d2c0 am: 0fe4efcfa8 am: 8c04df2e48
authorChad Versace <chadversary@google.com>
Mon, 23 Jan 2017 19:46:24 +0000 (19:46 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Mon, 23 Jan 2017 19:46:24 +0000 (19:46 +0000)
am: c6bf22467b

Change-Id: I178d4051826827c2f785f9d6ca8507fab1d4a931

framework/platform/X11/tcuX11Platform.cpp

index a34dcdf..eb00635 100644 (file)
@@ -144,5 +144,13 @@ X11Platform::X11Platform (void)
 
 tcu::Platform* createPlatform (void)
 {
+       // 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.
+       DE_CHECK_RUNTIME_ERR(XInitThreads() != 0);
+
        return new tcu::x11::X11Platform();
 }