From a72d57fe260bde3fd57de192a93dca6ae11401d7 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Sun, 6 Nov 2022 20:52:26 +0800 Subject: [PATCH] util: cleanup os_thread.h __pipe_mutex_assert_locked is not used anymore so remove it from os_thread.h The remove of "pipe/p_compiler.h" caused compiling failure also fixed Signed-off-by: Yonggang Luo Reviewed-by: Jesse Natalie Part-of: --- src/gallium/auxiliary/os/os_thread.h | 23 ----------------------- src/gallium/frontends/glx/xlib/glx_api.c | 1 + 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index b169b961df1..404f716db47 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src/gallium/auxiliary/os/os_thread.h @@ -36,29 +36,6 @@ #ifndef OS_THREAD_H_ #define OS_THREAD_H_ - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" /* for assert */ #include "util/u_thread.h" - -#define pipe_mutex_assert_locked(mutex) \ - __pipe_mutex_assert_locked(&(mutex)) - -static inline void -__pipe_mutex_assert_locked(mtx_t *mutex) -{ -#ifdef DEBUG - /* NOTE: this would not work for recursive mutexes, but - * mtx_t doesn't support those - */ - int ret = mtx_trylock(mutex); - assert(ret == thrd_busy); - if (ret == thrd_success) - mtx_unlock(mutex); -#else - (void)mutex; -#endif -} - #endif /* OS_THREAD_H_ */ diff --git a/src/gallium/frontends/glx/xlib/glx_api.c b/src/gallium/frontends/glx/xlib/glx_api.c index 940ebd00a93..86dd86ebd24 100644 --- a/src/gallium/frontends/glx/xlib/glx_api.c +++ b/src/gallium/frontends/glx/xlib/glx_api.c @@ -41,6 +41,7 @@ #include "xm_api.h" #include "main/errors.h" #include "main/config.h" +#include "pipe/p_compiler.h" #include "util/u_math.h" #include "util/u_memory.h"