diff options
author | Yonggang Luo <luoyonggang@gmail.com> | 2022-06-16 13:56:10 +0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-08-10 20:14:15 +0000 |
commit | e819f713794108f3b34d6b503396bd72b6315b33 (patch) | |
tree | 8ddb7761e742edd133131bafc6cad376808886f1 /src/c11 | |
parent | c37c6ac613b17ae34978065871f90fe16d154da4 (diff) |
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 <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17071>
Diffstat (limited to 'src/c11')
-rw-r--r-- | src/c11/threads.h | 2 |
1 files changed, 1 insertions, 1 deletions
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. |