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

Unified Diff: runtime/vm/thread.h

Issue 8362026: Fixed a problem with spurious wakeups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 2 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
Index: runtime/vm/thread.h
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 1ef4f299aa240c6136c8026b666d52b87ded2f25..996da30ffb6e5015dac22bd5da5eb9dbc1a9987b 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -2,8 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-#ifndef VM_THREAD_H_
-#define VM_THREAD_H_
+#ifndef RUNTIME_VM_THREAD_H_
+#define RUNTIME_VM_THREAD_H_
siva 2011/10/21 21:18:33 Why did you change this? If you look at all the ot
jrgfogh 2011/10/24 09:20:42 A presubmit script told me to do it when I tried t
Søren Gjesse 2011/10/26 12:07:10 That is annoying. When this error is the only one
#include "vm/assert.h"
#include "vm/allocation.h"
@@ -70,6 +70,7 @@ class Monitor {
void Exit();
// Wait for notification or timeout.
+ // May return too early due to spurious wakeups. Callers should test for this.
siva 2011/10/21 21:18:33 I think this comment is not necessary.
jrgfogh 2011/10/24 09:20:42 I disagree, since it affects the semantics. I woul
WaitResult Wait(int64_t millis);
// Notify waiting threads.
@@ -118,6 +119,7 @@ class MonitorLocker : public StackResource {
// TODO(iposva): Consider decrementing the no GC scope here.
}
+ // May return too early due to spurious wakeups. Callers should test for this.
siva 2011/10/21 21:18:33 Ditto.
jrgfogh 2011/10/24 09:20:42 Ditto.
Monitor::WaitResult Wait(int64_t millis = Monitor::kNoTimeout) {
return monitor_->Wait(millis);
}
@@ -139,4 +141,4 @@ class MonitorLocker : public StackResource {
} // namespace dart
-#endif // VM_THREAD_H_
+#endif // RUNTIME_VM_THREAD_H_
siva 2011/10/21 21:18:33 ditto.
jrgfogh 2011/10/24 09:20:42 ditto.

Powered by Google App Engine
This is Rietveld 408576698