gallium/util: do not use _MTX_INITIALIZER_NP on Windows

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>
This commit is contained in:
Erik Faye-Lund 2020-07-10 12:31:51 +02:00 committed by Marge Bot
parent 485ea7d711
commit b8c0196116
2 changed files with 8 additions and 0 deletions

View 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;

View 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)