glx: Remove usage of pipe_tsd_set and pipe_tsd_get
authorYonggang Luo <luoyonggang@gmail.com>
Tue, 21 Jun 2022 09:23:59 +0000 (17:23 +0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 29 Jul 2022 23:59:12 +0000 (23:59 +0000)
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>

src/gallium/frontends/glx/xlib/glx_api.c

index 84b70f8..940ebd0 100644 (file)
@@ -103,21 +103,20 @@ struct __GLXcontextRec
 };
 
 
-
-static pipe_tsd ContextTSD;
+thread_local GLXContext ContextTSD;
 
 /** Set current context for calling thread */
 static void
 SetCurrentContext(GLXContext c)
 {
-   pipe_tsd_set(&ContextTSD, c);
+   ContextTSD = c;
 }
 
 /** Get current context for calling thread */
 static GLXContext
 GetCurrentContext(void)
 {
-   return pipe_tsd_get(&ContextTSD);
+   return ContextTSD;
 }