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

Unified Diff: runtime/vm/thread_interrupter.cc

Issue 1439483003: - Add an OSThread structure which is the generic TLS structure for all C++ (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review Created 5 years, 1 month 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/thread_interrupter.h ('k') | runtime/vm/thread_interrupter_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread_interrupter.cc
diff --git a/runtime/vm/thread_interrupter.cc b/runtime/vm/thread_interrupter.cc
index 8a8af044fce87fd942b2c2fa66d1a8045ba3e910..920baf6b564cc653138ba9a17cbbd0deeb795a15 100644
--- a/runtime/vm/thread_interrupter.cc
+++ b/runtime/vm/thread_interrupter.cc
@@ -75,7 +75,7 @@ void ThreadInterrupter::Startup() {
ASSERT(interrupter_thread_id_ == OSThread::kInvalidThreadJoinId);
{
MonitorLocker startup_ml(monitor_);
- OSThread::Start(ThreadMain, 0);
+ OSThread::Start("ThreadInterrupter", ThreadMain, 0);
while (!thread_running_) {
startup_ml.Wait();
}
@@ -153,7 +153,9 @@ void ThreadInterrupter::ThreadMain(uword parameters) {
{
// Signal to main thread we are ready.
MonitorLocker startup_ml(monitor_);
- interrupter_thread_id_ = OSThread::GetCurrentThreadJoinId();
+ OSThread* os_thread = OSThread::Current();
+ ASSERT(os_thread != NULL);
+ interrupter_thread_id_ = os_thread->join_id();
thread_running_ = true;
startup_ml.Notify();
}
@@ -182,9 +184,9 @@ void ThreadInterrupter::ThreadMain(uword parameters) {
monitor_->Exit();
{
- ThreadIterator it;
+ OSThreadIterator it;
while (it.HasNext()) {
- Thread* thread = it.Next();
+ OSThread* thread = it.Next();
if (thread->ThreadInterruptsEnabled()) {
interrupted_thread_count++;
InterruptThread(thread);
« no previous file with comments | « runtime/vm/thread_interrupter.h ('k') | runtime/vm/thread_interrupter_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698