Module: Mesa
Branch: main
Commit: af1fe5c2c8727d7be026e4a8a79c582e8ca42c20
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=af1fe5c2c8727d7be026e4a8a79c582e8ca42c20

Author: Yonggang Luo <[email protected]>
Date:   Tue Jun 21 17:23:59 2022 +0800

glx: Remove usage of pipe_tsd_set and pipe_tsd_get

Signed-off-by: Yonggang Luo <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>

---

 src/gallium/frontends/glx/xlib/glx_api.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gallium/frontends/glx/xlib/glx_api.c 
b/src/gallium/frontends/glx/xlib/glx_api.c
index 84b70f87207..940ebd00a93 100644
--- a/src/gallium/frontends/glx/xlib/glx_api.c
+++ b/src/gallium/frontends/glx/xlib/glx_api.c
@@ -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;
 }
 
 

Reply via email to