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; }