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

Side by Side Diff: runtime/vm/lockers.h

Issue 1541073002: Implement safepointing of threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix-typo Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/lockers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_LOCKERS_H_ 5 #ifndef VM_LOCKERS_H_
6 #define VM_LOCKERS_H_ 6 #define VM_LOCKERS_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 virtual ~MonitorLocker() { 44 virtual ~MonitorLocker() {
45 monitor_->Exit(); 45 monitor_->Exit();
46 // TODO(iposva): Consider decrementing the no GC scope here. 46 // TODO(iposva): Consider decrementing the no GC scope here.
47 } 47 }
48 48
49 Monitor::WaitResult Wait(int64_t millis = Monitor::kNoTimeout) { 49 Monitor::WaitResult Wait(int64_t millis = Monitor::kNoTimeout) {
50 return monitor_->Wait(millis); 50 return monitor_->Wait(millis);
51 } 51 }
52 52
53 Monitor::WaitResult WaitWithSafepointCheck(
54 Thread* thread, int64_t millis = Monitor::kNoTimeout);
55
53 Monitor::WaitResult WaitMicros(int64_t micros = Monitor::kNoTimeout) { 56 Monitor::WaitResult WaitMicros(int64_t micros = Monitor::kNoTimeout) {
54 return monitor_->WaitMicros(micros); 57 return monitor_->WaitMicros(micros);
55 } 58 }
56 59
57 void Notify() { 60 void Notify() {
58 monitor_->Notify(); 61 monitor_->Notify();
59 } 62 }
60 63
61 void NotifyAll() { 64 void NotifyAll() {
62 monitor_->NotifyAll(); 65 monitor_->NotifyAll();
63 } 66 }
64 67
65 private: 68 private:
66 Monitor* const monitor_; 69 Monitor* const monitor_;
67 70
68 DISALLOW_COPY_AND_ASSIGN(MonitorLocker); 71 DISALLOW_COPY_AND_ASSIGN(MonitorLocker);
69 }; 72 };
70 73
71 } // namespace dart 74 } // namespace dart
72 75
73 76
74 #endif // VM_LOCKERS_H_ 77 #endif // VM_LOCKERS_H_
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/lockers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698