diff --git a/src/util/u_debug_stack_android.cpp b/src/util/u_debug_stack_android.cpp index 061707c6790..be3a88985de 100644 --- a/src/util/u_debug_stack_android.cpp +++ b/src/util/u_debug_stack_android.cpp @@ -23,13 +23,14 @@ #include +#include "util/simple_mtx.h" #include "util/u_debug.h" #include "u_debug_stack.h" #include "util/hash_table.h" #include "os/os_thread.h" static hash_table *symbol_table; -static mtx_t table_mutex = _MTX_INITIALIZER_NP; +static simple_mtx_t table_mutex = SIMPLE_MTX_INITIALIZER; static const char * intern_symbol(const char *symbol) @@ -67,7 +68,7 @@ debug_backtrace_capture(debug_stack_frame *backtrace, /* Add one to exclude this call. Unwind already ignores itself. */ bt->Unwind(start_frame + 1); - mtx_lock(&table_mutex); + simple_mtx_lock(&table_mutex); for (unsigned i = 0; i < nr_frames; i++) { const backtrace_frame_data_t* frame = bt->GetFrame(i); @@ -82,7 +83,7 @@ debug_backtrace_capture(debug_stack_frame *backtrace, } } - mtx_unlock(&table_mutex); + simple_mtx_unlock(&table_mutex); delete bt; }