]> git.cworth.org Git - apitrace/commitdiff
Use compiler TLS for GL tracing.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Wed, 24 Oct 2012 15:48:55 +0000 (16:48 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Wed, 24 Oct 2012 15:48:55 +0000 (16:48 +0100)
wrappers/gltrace_state.cpp

index 5c7ad1bf66ae242cfe1092ecf8459dcc80814f3a..68bda100354db46025c678618d3d66f2a9d6749e 100644 (file)
@@ -57,15 +57,13 @@ public:
     }
 };
 
-static os::thread_specific_ptr<ThreadState> thread_state;
+static thread_specific ThreadState *thread_state;
 
 static ThreadState *get_ts(void)
 {
-    ThreadState *ts = thread_state.get();
-
+    ThreadState *ts = thread_state;
     if (!ts) {
-        ts = new ThreadState;
-        thread_state.reset(ts);
+        thread_state = ts = new ThreadState;
     }
 
     return ts;