Migrate to webrtc::GlobalMutex.
Bug: webrtc:11567
Change-Id: I853434745c427e54474739e9c573e0f6f4fcedef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179283
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31732}
diff --git a/sdk/android/native_api/stacktrace/stacktrace.cc b/sdk/android/native_api/stacktrace/stacktrace.cc
index 6350aca..cea3490 100644
--- a/sdk/android/native_api/stacktrace/stacktrace.cc
+++ b/sdk/android/native_api/stacktrace/stacktrace.cc
@@ -27,9 +27,9 @@
#endif
#include "absl/base/attributes.h"
-#include "rtc_base/critical_section.h"
#include "rtc_base/logging.h"
#include "rtc_base/strings/string_builder.h"
+#include "rtc_base/synchronization/mutex.h"
namespace webrtc {
@@ -92,7 +92,7 @@
};
// Global lock to ensure only one thread gets interrupted at a time.
-ABSL_CONST_INIT rtc::GlobalLock g_signal_handler_lock;
+ABSL_CONST_INIT GlobalMutex g_signal_handler_lock(absl::kConstInit);
// Argument passed to the ThreadSignalHandler() from the sampling thread to the
// sampled (stopped) thread. This value is set just before sending signal to the
// thread and reset when handler is done.
@@ -153,7 +153,7 @@
act.sa_flags = SA_RESTART | SA_SIGINFO;
sigemptyset(&act.sa_mask);
- rtc::GlobalLockScope ls(&g_signal_handler_lock);
+ GlobalMutexLock ls(&g_signal_handler_lock);
g_signal_handler_output_state = params;
if (sigaction(kSignal, &act, &old_act) != 0)