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

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 members in disasm-x64.c because they conflict with Mach defines. 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
Index: src/platform/mutex.h
diff --git a/src/platform/mutex.h b/src/platform/mutex.h
index 19405424102c377130f08e071387d1c616e49ab7..96832ceb41a45c150de423c405b3a00ed59e80ca 100644
--- a/src/platform/mutex.h
+++ b/src/platform/mutex.h
@@ -40,6 +40,9 @@
namespace v8 {
namespace internal {
+// Forward declarations.
+class ConditionVariable;
Michael Starzinger 2013/09/02 19:12:43 There should be no need to forward declare this if
Benedikt Meurer 2013/09/03 07:27:39 Done.
+
// ----------------------------------------------------------------------------
// Mutex
//
@@ -94,6 +97,22 @@ class Mutex V8_FINAL {
int level_;
#endif
+ V8_INLINE(void CheckHeldAndUnmark()) {
Michael Starzinger 2013/09/02 19:12:43 nit: s/Check/Assert/, we use "check" to describe p
Benedikt Meurer 2013/09/03 07:27:39 Done.
+#ifdef DEBUG
+ ASSERT_EQ(1, level_);
+ level_--;
+#endif
+ }
+
+ V8_INLINE(void CheckUnheldAndMark()) {
Michael Starzinger 2013/09/02 19:12:43 Likewise.
Benedikt Meurer 2013/09/03 07:27:39 Done.
+#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') | src/x64/disasm-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698