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

Unified Diff: runtime/vm/os_thread_android.cc

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/os_thread.h ('k') | runtime/vm/os_thread_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_thread_android.cc
===================================================================
--- runtime/vm/os_thread_android.cc (revision 44732)
+++ runtime/vm/os_thread_android.cc (working copy)
@@ -11,7 +11,6 @@
#include <sys/time.h> // NOLINT
#include "platform/assert.h"
-#include "vm/isolate.h"
namespace dart {
@@ -197,7 +196,7 @@
// When running with assertions enabled we do track the owner.
#if defined(DEBUG)
- owner_ = NULL;
+ owner_ = OSThread::kInvalidThreadId;
#endif // defined(DEBUG)
}
@@ -209,7 +208,7 @@
// When running with assertions enabled we do track the owner.
#if defined(DEBUG)
- ASSERT(owner_ == NULL);
+ ASSERT(owner_ == OSThread::kInvalidThreadId);
#endif // defined(DEBUG)
}
@@ -221,7 +220,7 @@
ASSERT(result == 0); // Verify no other errors.
// When running with assertions enabled we do track the owner.
#if defined(DEBUG)
- owner_ = Isolate::Current();
+ owner_ = OSThread::GetCurrentThreadId();
#endif // defined(DEBUG)
}
@@ -235,7 +234,7 @@
ASSERT(result == 0); // Verify no other errors.
// When running with assertions enabled we do track the owner.
#if defined(DEBUG)
- owner_ = Isolate::Current();
+ owner_ = OSThread::GetCurrentThreadId();
#endif // defined(DEBUG)
return true;
}
@@ -244,8 +243,8 @@
void Mutex::Unlock() {
// When running with assertions enabled we do track the owner.
#if defined(DEBUG)
- ASSERT(owner_ == Isolate::Current());
- owner_ = NULL;
+ ASSERT(IsOwnedByCurrentThread());
+ owner_ = OSThread::kInvalidThreadId;
#endif // defined(DEBUG)
int result = pthread_mutex_unlock(data_.mutex());
// Specifically check for wrong thread unlocking to aid debugging.
« no previous file with comments | « runtime/vm/os_thread.h ('k') | runtime/vm/os_thread_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698