| Index: runtime/vm/os_thread_linux.cc
|
| ===================================================================
|
| --- runtime/vm/os_thread_linux.cc (revision 44732)
|
| +++ runtime/vm/os_thread_linux.cc (working copy)
|
| @@ -12,7 +12,6 @@
|
| #include <sys/time.h> // NOLINT
|
|
|
| #include "platform/assert.h"
|
| -#include "vm/isolate.h"
|
|
|
| namespace dart {
|
|
|
| @@ -198,7 +197,7 @@
|
|
|
| // When running with assertions enabled we do track the owner.
|
| #if defined(DEBUG)
|
| - owner_ = NULL;
|
| + owner_ = OSThread::kInvalidThreadId;
|
| #endif // defined(DEBUG)
|
| }
|
|
|
| @@ -210,7 +209,7 @@
|
|
|
| // When running with assertions enabled we do track the owner.
|
| #if defined(DEBUG)
|
| - ASSERT(owner_ == NULL);
|
| + ASSERT(owner_ == OSThread::kInvalidThreadId);
|
| #endif // defined(DEBUG)
|
| }
|
|
|
| @@ -222,7 +221,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)
|
| }
|
|
|
| @@ -236,7 +235,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;
|
| }
|
| @@ -245,8 +244,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.
|
|
|