diff options
Diffstat (limited to 'absl/base/call_once_test.cc')
-rw-r--r-- | absl/base/call_once_test.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/absl/base/call_once_test.cc b/absl/base/call_once_test.cc index cd58ee19f08e..183b92efa329 100644 --- a/absl/base/call_once_test.cc +++ b/absl/base/call_once_test.cc @@ -18,6 +18,8 @@ #include <vector> #include "gtest/gtest.h" +#include "absl/base/attributes.h" +#include "absl/base/const_init.h" #include "absl/base/thread_annotations.h" #include "absl/synchronization/mutex.h" @@ -25,7 +27,8 @@ namespace absl { namespace { absl::once_flag once; -Mutex counters_mu; + +ABSL_CONST_INIT Mutex counters_mu(absl::kConstInit); int running_thread_count GUARDED_BY(counters_mu) = 0; int call_once_invoke_count GUARDED_BY(counters_mu) = 0; |