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

Unified Diff: runtime/vm/os_thread.h

Issue 999983004: simMutex (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 | « runtime/vm/freelist.cc ('k') | runtime/vm/os_thread_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_thread.h
===================================================================
--- runtime/vm/os_thread.h (revision 44732)
+++ runtime/vm/os_thread.h (working copy)
@@ -23,8 +23,6 @@
namespace dart {
-class Isolate;
-
// Low-level operations on OS platform threads.
class OSThread : AllStatic {
public:
@@ -63,13 +61,15 @@
void Unlock();
#if defined(DEBUG)
- Isolate* Owner() const { return owner_; }
+ bool IsOwnedByCurrentThread() const {
+ return owner_ == OSThread::GetCurrentThreadId();
+ }
#endif // defined(DEBUG)
private:
MutexData data_;
#if defined(DEBUG)
- Isolate* owner_;
+ ThreadId owner_;
#endif // defined(DEBUG)
DISALLOW_COPY_AND_ASSIGN(Mutex);
« no previous file with comments | « runtime/vm/freelist.cc ('k') | runtime/vm/os_thread_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698