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

Side by Side Diff: webrtc/system_wrappers/source/trace_impl.cc

Issue 1246073002: Implement store as an explicit atomic operation. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: s/Increment/ReleaseStore Created 5 years, 5 months 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 unified diff | Download patch
« no previous file with comments | « webrtc/base/refcount.h ('k') | webrtc/video/video_capture_input.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 if (trace) { 535 if (trace) {
536 int ret_val = trace->TraceFileImpl(file_name); 536 int ret_val = trace->TraceFileImpl(file_name);
537 ReturnTrace(); 537 ReturnTrace();
538 return ret_val; 538 return ret_val;
539 } 539 }
540 return -1; 540 return -1;
541 } 541 }
542 542
543 // static 543 // static
544 void Trace::set_level_filter(int filter) { 544 void Trace::set_level_filter(int filter) {
545 rtc::AtomicOps::Store(&level_filter_, filter); 545 rtc::AtomicOps::ReleaseStore(&level_filter_, filter);
546 } 546 }
547 547
548 // static 548 // static
549 int Trace::level_filter() { 549 int Trace::level_filter() {
550 return rtc::AtomicOps::Load(&level_filter_); 550 return rtc::AtomicOps::AcquireLoad(&level_filter_);
551 } 551 }
552 552
553 // static 553 // static
554 int32_t Trace::SetTraceFile(const char* file_name, 554 int32_t Trace::SetTraceFile(const char* file_name,
555 const bool add_file_counter) { 555 const bool add_file_counter) {
556 TraceImpl* trace = TraceImpl::GetTrace(); 556 TraceImpl* trace = TraceImpl::GetTrace();
557 if (trace) { 557 if (trace) {
558 int ret_val = trace->SetTraceFileImpl(file_name, add_file_counter); 558 int ret_val = trace->SetTraceFileImpl(file_name, add_file_counter);
559 ReturnTrace(); 559 ReturnTrace();
560 return ret_val; 560 return ret_val;
(...skipping 29 matching lines...) Expand all
590 va_end(args); 590 va_end(args);
591 buff = temp_buff; 591 buff = temp_buff;
592 } 592 }
593 trace->AddImpl(level, module, id, buff); 593 trace->AddImpl(level, module, id, buff);
594 } 594 }
595 ReturnTrace(); 595 ReturnTrace();
596 } 596 }
597 } 597 }
598 598
599 } // namespace webrtc 599 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/base/refcount.h ('k') | webrtc/video/video_capture_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698