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

Unified Diff: src/isolate.cc

Issue 2912773002: Rename "NoBarrier" memory operations to "Relaxed". (Closed)
Patch Set: comment Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.h ('k') | src/libplatform/tracing/tracing-controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 3ea27298024334d7c15c16058d99d8d9160bbffb..8b38e86d0cff7dcc886f94a32517c26427dec0ff 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -62,7 +62,7 @@ namespace internal {
base::Atomic32 ThreadId::highest_thread_id_ = 0;
int ThreadId::AllocateThreadId() {
- int new_id = base::NoBarrier_AtomicIncrement(&highest_thread_id_, 1);
+ int new_id = base::Relaxed_AtomicIncrement(&highest_thread_id_, 1);
return new_id;
}
@@ -189,7 +189,7 @@ void Isolate::InitializeOncePerProcess() {
CHECK(thread_data_table_ == NULL);
isolate_key_ = base::Thread::CreateThreadLocalKey();
#if DEBUG
- base::NoBarrier_Store(&isolate_key_created_, 1);
+ base::Relaxed_Store(&isolate_key_created_, 1);
#endif
thread_id_key_ = base::Thread::CreateThreadLocalKey();
per_isolate_thread_data_key_ = base::Thread::CreateThreadLocalKey();
@@ -2344,7 +2344,7 @@ Isolate::Isolate(bool enable_serializer)
base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
CHECK(thread_data_table_);
}
- id_ = base::NoBarrier_AtomicIncrement(&isolate_counter_, 1);
+ id_ = base::Relaxed_AtomicIncrement(&isolate_counter_, 1);
TRACE_ISOLATE(constructor);
memset(isolate_addresses_, 0,
@@ -2390,7 +2390,7 @@ void Isolate::TearDown() {
// direct pointer. We don't use Enter/Exit here to avoid
// initializing the thread data.
PerIsolateThreadData* saved_data = CurrentPerIsolateThreadData();
- DCHECK(base::NoBarrier_Load(&isolate_key_created_) == 1);
+ DCHECK(base::Relaxed_Load(&isolate_key_created_) == 1);
Isolate* saved_isolate =
reinterpret_cast<Isolate*>(base::Thread::GetThreadLocal(isolate_key_));
SetIsolateThreadLocals(this, NULL);
« no previous file with comments | « src/isolate.h ('k') | src/libplatform/tracing/tracing-controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698