diff options
| author | 2012-04-09 13:55:55 -0700 | |
|---|---|---|
| committer | 2012-04-09 13:55:55 -0700 | |
| commit | 34e069606d6f1698cd3c33b39e72b79ae27e1c7b (patch) | |
| tree | 0feb7e9bde6cfe01c0df3ef2d8de3210570f7ce2 /src/compiler.cc | |
| parent | e62934d85fbc2d935afdad57eeade39ecbd7440a (diff) | |
Remove the useless "suspend count already zero" message for new threads.
We can actually detect the expected case of this warning ourselves, and
not emit it. Then we can upgrade the WARNING to a FATAL.
I also tripped over the fact that the operator<< for Thread::State was out
of date, so I've moved the Thread enums up to namespace scope so the script
can automatically generate correct operator<< implementations for us. (All
the high-numbered thread states have been off by one for a couple of weeks.)
Change-Id: I5de573d33d641e5a3cba87b370e9620c8c66e633
Diffstat (limited to 'src/compiler.cc')
| -rw-r--r-- | src/compiler.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler.cc b/src/compiler.cc index bac39efe04..3980bacac2 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -943,10 +943,10 @@ class WorkerThread { if (worker->spawn_) { runtime->AttachCurrentThread("Compiler Worker", true, NULL); } - Thread::Current()->SetState(Thread::kRunnable); + Thread::Current()->SetState(kRunnable); worker->Run(); if (worker->spawn_) { - Thread::Current()->SetState(Thread::kNative); + Thread::Current()->SetState(kNative); runtime->DetachCurrentThread(); } return NULL; @@ -988,7 +988,7 @@ void ForAll(Context* context, size_t begin, size_t end, Callback callback, size_ threads[0]->Go(); // Switch to kVmWait while we're blocked waiting for the other threads to finish. - ScopedThreadStateChange tsc(self, Thread::kVmWait); + ScopedThreadStateChange tsc(self, kVmWait); STLDeleteElements(&threads); } |