summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2012-11-20 11:58:27 -0800
committerPaul Berry <stereotype441@gmail.com>2012-11-20 11:58:27 -0800
commit12ce4ccb5258844a462daf5ba5c2ecfb5a740d34 (patch)
treedabfcda3842e5362d90d8c7e5e97f3e039a7720e
parent15e0e76061ff75802479c0f3d9354f5199efbb68 (diff)
glx-multithread: use XInitThreads
To use multithreading with xlib, you're supposed to call XInitThreads before any other xlib call. Without this, xlib and GLX calls won't be thread safe. (Based on a patch by Ian Romanick <ian.d.romanick@intel.com>)
-rw-r--r--tests/glx/glx-multithread.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/glx/glx-multithread.c b/tests/glx/glx-multithread.c
index 10095f37..2372609d 100644
--- a/tests/glx/glx-multithread.c
+++ b/tests/glx/glx-multithread.c
@@ -120,6 +120,7 @@ main(int argc, char **argv)
fprintf(stderr, "Unknown option: %s\n", argv[i]);
}
+ XInitThreads();
dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
fprintf(stderr, "couldn't open display\n");