From af1fe5c2c8727d7be026e4a8a79c582e8ca42c20 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Tue, 21 Jun 2022 17:23:59 +0800 Subject: [PATCH] glx: Remove usage of pipe_tsd_set and pipe_tsd_get Signed-off-by: Yonggang Luo Reviewed-by: Emil Velikov Part-of: --- 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; }