Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(653)

Unified Diff: webrtc/system_wrappers/source/trace_impl.cc

Issue 1498953002: Reland of "Create rtc::AtomicInt POD struct." (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: initializer to audio_device_ios.mm Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/system_wrappers/include/trace.h ('k') | webrtc/video/video_capture_input.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/trace_impl.cc
diff --git a/webrtc/system_wrappers/source/trace_impl.cc b/webrtc/system_wrappers/source/trace_impl.cc
index 5029f5ab6ea7267d82d6220928de0b77d9a24e92..3bf1f1bb64b07476725df8a8731cd68f9af34ce8 100644
--- a/webrtc/system_wrappers/source/trace_impl.cc
+++ b/webrtc/system_wrappers/source/trace_impl.cc
@@ -34,7 +34,7 @@ namespace webrtc {
const int Trace::kBoilerplateLength = 71;
const int Trace::kTimestampPosition = 13;
const int Trace::kTimestampLength = 12;
-volatile int Trace::level_filter_ = kTraceDefault;
+rtc::AtomicInt Trace::level_filter_ = {kTraceDefault};
// Construct On First Use idiom. Avoids "static initialization order fiasco".
TraceImpl* TraceImpl::StaticInstance(CountOperation count_operation,
@@ -548,12 +548,12 @@ int32_t Trace::TraceFile(char file_name[FileWrapper::kMaxFileNameSize]) {
// static
void Trace::set_level_filter(int filter) {
- rtc::AtomicOps::ReleaseStore(&level_filter_, filter);
+ rtc::AtomicInt::ReleaseStore(&level_filter_, filter);
}
// static
int Trace::level_filter() {
- return rtc::AtomicOps::AcquireLoad(&level_filter_);
+ return rtc::AtomicInt::AcquireLoad(&level_filter_);
}
// static
« no previous file with comments | « webrtc/system_wrappers/include/trace.h ('k') | webrtc/video/video_capture_input.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698