gallium/util: do not use _MTX_INITIALIZER_NP on Windows
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 10 Jul 2020 10:31:51 +0000 (12:31 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 16 Jul 2020 10:09:15 +0000 (10:09 +0000)
We already have another way of initializing these, so it's just a matter
of avoiding _MTX_INITIALIZER_NP here.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5902>

src/gallium/auxiliary/util/u_debug_refcnt.c
src/gallium/auxiliary/util/u_debug_symbol.c

index f849e59cb3e9e6069dfd609076d32fff4d3b7328..a25234b46cf6a67ff68861188d4a53c01c6a1d8f 100644 (file)
@@ -53,7 +53,11 @@ static FILE *stream;
 /* TODO: maybe move this serial machinery to a stand-alone module and
  * expose it?
  */
+#ifdef PIPE_OS_WINDOWS
+static mtx_t serials_mutex;
+#else
 static mtx_t serials_mutex = _MTX_INITIALIZER_NP;
+#endif
 
 static struct hash_table *serials_hash;
 static unsigned serials_last;
index 334803d008ee67fa2e6dd59db8cafd0325a75098..4bbed585d8176c72153d30663f3e28aefce2909d 100644 (file)
@@ -271,7 +271,11 @@ debug_symbol_print(const void *addr)
 }
 
 struct hash_table* symbols_hash;
+#ifdef PIPE_OS_WINDOWS
+static mtx_t symbols_mutex;
+#else
 static mtx_t symbols_mutex = _MTX_INITIALIZER_NP;
+#endif
 
 const char*
 debug_symbol_name_cached(const void *addr)