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

Unified Diff: src/isolate.h

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/inspector/v8-profiler-agent-impl.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index 47ec220dd86d11d9c6e645e408395c361d5e301c..1296a20b01e7e2171e74680fd01da1f9ac718bfe 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -222,10 +222,10 @@ class Interpreter;
class ThreadId {
public:
// Creates an invalid ThreadId.
- ThreadId() { base::NoBarrier_Store(&id_, kInvalidId); }
+ ThreadId() { base::Relaxed_Store(&id_, kInvalidId); }
ThreadId& operator=(const ThreadId& other) {
- base::NoBarrier_Store(&id_, base::NoBarrier_Load(&other.id_));
+ base::Relaxed_Store(&id_, base::Relaxed_Load(&other.id_));
return *this;
}
@@ -237,17 +237,17 @@ class ThreadId {
// Compares ThreadIds for equality.
INLINE(bool Equals(const ThreadId& other) const) {
- return base::NoBarrier_Load(&id_) == base::NoBarrier_Load(&other.id_);
+ return base::Relaxed_Load(&id_) == base::Relaxed_Load(&other.id_);
}
// Checks whether this ThreadId refers to any thread.
INLINE(bool IsValid() const) {
- return base::NoBarrier_Load(&id_) != kInvalidId;
+ return base::Relaxed_Load(&id_) != kInvalidId;
}
// Converts ThreadId to an integer representation
// (required for public API: V8::V8::GetCurrentThreadId).
- int ToInteger() const { return static_cast<int>(base::NoBarrier_Load(&id_)); }
+ int ToInteger() const { return static_cast<int>(base::Relaxed_Load(&id_)); }
// Converts ThreadId to an integer representation
// (required for public API: V8::V8::TerminateExecution).
@@ -256,7 +256,7 @@ class ThreadId {
private:
static const int kInvalidId = -1;
- explicit ThreadId(int id) { base::NoBarrier_Store(&id_, id); }
+ explicit ThreadId(int id) { base::Relaxed_Store(&id_, id); }
static int AllocateThreadId();
@@ -523,7 +523,7 @@ class Isolate {
// Returns the isolate inside which the current thread is running.
INLINE(static Isolate* Current()) {
- DCHECK(base::NoBarrier_Load(&isolate_key_created_) == 1);
+ DCHECK(base::Relaxed_Load(&isolate_key_created_) == 1);
Isolate* isolate = reinterpret_cast<Isolate*>(
base::Thread::GetExistingThreadLocal(isolate_key_));
DCHECK(isolate != NULL);
« no previous file with comments | « src/inspector/v8-profiler-agent-impl.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698