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

Unified Diff: src/platform/mutex.h

Issue 23548007: Import ConditionVariable class. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename OperandSize enum names. Created 7 years, 3 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/platform/condition-variable.cc ('k') | src/platform/mutex.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/mutex.h
diff --git a/src/platform/mutex.h b/src/platform/mutex.h
index 19405424102c377130f08e071387d1c616e49ab7..c760c20e499924554d0df40451577788a15f0e96 100644
--- a/src/platform/mutex.h
+++ b/src/platform/mutex.h
@@ -94,6 +94,22 @@ class Mutex V8_FINAL {
int level_;
#endif
+ V8_INLINE(void AssertHeldAndUnmark()) {
+#ifdef DEBUG
+ ASSERT_EQ(1, level_);
+ level_--;
+#endif
+ }
+
+ V8_INLINE(void AssertUnheldAndMark()) {
+#ifdef DEBUG
+ ASSERT_EQ(0, level_);
+ level_++;
+#endif
+ }
+
+ friend class ConditionVariable;
+
DISALLOW_COPY_AND_ASSIGN(Mutex);
};
« no previous file with comments | « src/platform/condition-variable.cc ('k') | src/platform/mutex.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698