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

Unified Diff: runtime/vm/thread.h

Issue 9196002: Move Mutex and Monitor from vm/ to platform/ (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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: runtime/vm/thread.h
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 2c5fad007022f0c4d2e3b7d78b6591b9a557696f..5b8723e3779b82e2e6557f0ba424a5506081a94c 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -6,6 +6,7 @@
#define VM_THREAD_H_
#include "platform/assert.h"
+#include "platform/thread.h"
#include "vm/allocation.h"
#include "vm/globals.h"
#include "vm/isolate.h"
@@ -39,51 +40,6 @@ class Thread {
};
-class Mutex {
- public:
- Mutex();
- ~Mutex();
-
- void Lock();
- bool TryLock();
- void Unlock();
-
- private:
- MutexData data_;
-
- DISALLOW_COPY_AND_ASSIGN(Mutex);
-};
-
-
-class Monitor {
- public:
- enum WaitResult {
- kNotified,
- kTimedOut
- };
-
- static const int64_t kNoTimeout = 0;
-
- Monitor();
- ~Monitor();
-
- void Enter();
- void Exit();
-
- // Wait for notification or timeout.
- WaitResult Wait(int64_t millis);
-
- // Notify waiting threads.
- void Notify();
- void NotifyAll();
-
- private:
- MonitorData data_; // OS-specific data.
-
- DISALLOW_COPY_AND_ASSIGN(Monitor);
-};
-
-
class MutexLocker : public StackResource {
public:
explicit MutexLocker(Mutex* mutex) :

Powered by Google App Engine
This is Rietveld 408576698