summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_message.cc
diff options
context:
space:
mode:
authorandrew@tullo.ch <andrew@tullo.ch@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-25 15:30:15 +0000
committerandrew@tullo.ch <andrew@tullo.ch@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-25 15:30:15 +0000
commitdc4fa481825071b02d5fe4fde8d6e4f42b3be6f7 (patch)
treea297cb1cd563485d979a103c57fbbc43c1604de3 /ipc/ipc_message.cc
parentce3a8f4e678b19600a34471e5c18e6302b98babf (diff)
downloadchromium_src-dc4fa481825071b02d5fe4fde8d6e4f42b3be6f7.zip
chromium_src-dc4fa481825071b02d5fe4fde8d6e4f42b3be6f7.tar.gz
chromium_src-dc4fa481825071b02d5fe4fde8d6e4f42b3be6f7.tar.bz2
Use StaticAtomicSequenceNumber instead of subtle::Atomic32 in IPCMessage.
BUG= Review URL: https://codereview.chromium.org/177123004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_message.cc')
-rw-r--r--ipc/ipc_message.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipc/ipc_message.cc b/ipc/ipc_message.cc
index cf3a65e..f7fe827 100644
--- a/ipc/ipc_message.cc
+++ b/ipc/ipc_message.cc
@@ -4,7 +4,7 @@
#include "ipc/ipc_message.h"
-#include "base/atomicops.h"
+#include "base/atomic_sequence_num.h"
#include "base/logging.h"
#include "build/build_config.h"
@@ -14,7 +14,7 @@
namespace {
-base::subtle::Atomic32 g_ref_num = 0;
+base::StaticAtomicSequenceNumber g_ref_num;
// Create a reference number for identifying IPC messages in traces. The return
// values has the reference number stored in the upper 24 bits, leaving the low
@@ -22,7 +22,7 @@ base::subtle::Atomic32 g_ref_num = 0;
inline uint32 GetRefNumUpper24() {
base::debug::TraceLog* trace_log = base::debug::TraceLog::GetInstance();
int32 pid = trace_log ? trace_log->process_id() : 0;
- int32 count = base::subtle::NoBarrier_AtomicIncrement(&g_ref_num, 1);
+ int32 count = g_ref_num.GetNext();
// The 24 bit hash is composed of 14 bits of the count and 10 bits of the
// Process ID. With the current trace event buffer cap, the 14-bit count did
// not appear to wrap during a trace. Note that it is not a big deal if