From 404808afc899913ab64bf702240b647146199a99 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Tue, 6 Sep 2022 21:55:23 +0800 Subject: [PATCH] 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 Reviewed-by: Jesse Natalie Part-of: --- src/util/u_queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/u_queue.c b/src/util/u_queue.c index ed8ad300ea0..1009912897a 100644 --- a/src/util/u_queue.c +++ b/src/util/u_queue.c @@ -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); }