Module: Mesa Branch: main Commit: e819f713794108f3b34d6b503396bd72b6315b33 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e819f713794108f3b34d6b503396bd72b6315b33
Author: Yonggang Luo <[email protected]> Date: Thu Jun 16 13:56:10 2022 +0800 c11: It's should detect PTHREAD_DESTRUCTOR_ITERATIONS when define TSS_DTOR_ITERATIONS INIT_ONCE_STATIC_INIT looks like miscopied from Win32's init once macro Correct implementation for reference https://gitlab.inria.fr/gustedt/p99/-/blob/master/p99/p99_threads_posix.h#L64 C11 standard: https://en.cppreference.com/w/c/thread/TSS_DTOR_ITERATIONS As TSS_DTOR_ITERATIONS didn't used in mesa codebase, so it's won't affect anything in mesa Signed-off-by: Yonggang Luo <[email protected]> Reviewed-by: Jesse Natalie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17071> --- src/c11/threads.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c11/threads.h b/src/c11/threads.h index 43dc243a9b8..c2818fd3012 100644 --- a/src/c11/threads.h +++ b/src/c11/threads.h @@ -116,7 +116,7 @@ typedef pthread_once_t once_flag; // FIXME: temporary non-standard hack to ease transition # define _MTX_INITIALIZER_NP PTHREAD_MUTEX_INITIALIZER # define ONCE_FLAG_INIT PTHREAD_ONCE_INIT -# ifdef INIT_ONCE_STATIC_INIT +# ifdef PTHREAD_DESTRUCTOR_ITERATIONS # define TSS_DTOR_ITERATIONS PTHREAD_DESTRUCTOR_ITERATIONS # else # define TSS_DTOR_ITERATIONS 1 // assume TSS dtor MAY be called at least once.
