Revert 8753 "Use atomic operations for setting/reading the trace..."

Caused VP9 test to fail on TSAN and doesn't build in some configuration due to
"../webrtc/base/criticalsection.h:181:12: error: cannot compile this atomic library call yet"
:-(

> Use atomic operations for setting/reading the trace filter.
> The filter is currently being set and read by a number of threads and tripping up tsan.
> 
> R=mflodman@webrtc.org
> BUG=
> 
> Review URL: https://webrtc-codereview.appspot.com/47609004

TBR=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51369004

Cr-Commit-Position: refs/heads/master@{#8759}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8759 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tommi@webrtc.org
2015-03-17 15:35:11 +00:00
parent b91d0f5130
commit 25819b8294
3 changed files with 7 additions and 33 deletions

View File

@ -49,10 +49,10 @@ class Trace {
// filter parameter is a bitmask where each message type is enumerated by the
// TraceLevel enumerator. TODO(hellner): why is the TraceLevel enumerator not
// defined in this file?
static void set_level_filter(int filter);
static void set_level_filter(uint32_t filter) { level_filter_ = filter; }
// Returns what type of messages are written to the trace file.
static int level_filter();
static uint32_t level_filter() { return level_filter_; }
// Sets the file name. If add_file_counter is false the same file will be
// reused when it fills up. If it's true a new file with incremented name
@ -84,7 +84,7 @@ class Trace {
const char* msg, ...);
private:
static volatile int level_filter_;
static uint32_t level_filter_;
};
} // namespace webrtc