util: Call function mtx_init on exit_mutex to replace the usage of _MTX_INITIALIZER_NP in u_queue.c

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/19154>
This commit is contained in:
Yonggang Luo 2022-09-06 21:55:23 +08:00 committed by Marge Bot
parent 35c7f2e809
commit 404808afc8
1 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,7 @@ static struct list_head queue_list = {
.next = &queue_list,
.prev = &queue_list,
};
static mtx_t exit_mutex = _MTX_INITIALIZER_NP;
static mtx_t exit_mutex;
static void
atexit_handler(void)
@ -77,6 +77,7 @@ atexit_handler(void)
static void
global_init(void)
{
mtx_init(&exit_mutex, mtx_plain);
atexit(atexit_handler);
}