OLD | NEW |
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 | 5 |
6 #include "vm/code_observers.h" | 6 #include "vm/code_observers.h" |
7 | 7 |
8 #include "platform/thread.h" | |
9 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 #include "vm/thread.h" |
10 | 10 |
11 namespace dart { | 11 namespace dart { |
12 | 12 |
13 Mutex* CodeObservers::mutex_ = NULL; | 13 Mutex* CodeObservers::mutex_ = NULL; |
14 intptr_t CodeObservers::observers_length_ = 0; | 14 intptr_t CodeObservers::observers_length_ = 0; |
15 CodeObserver** CodeObservers::observers_ = NULL; | 15 CodeObserver** CodeObservers::observers_ = NULL; |
16 | 16 |
17 | 17 |
18 void CodeObservers::Register(CodeObserver* observer) { | 18 void CodeObservers::Register(CodeObserver* observer) { |
19 observers_length_++; | 19 observers_length_++; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 void CodeObservers::InitOnce() { | 61 void CodeObservers::InitOnce() { |
62 ASSERT(mutex_ == NULL); | 62 ASSERT(mutex_ == NULL); |
63 mutex_ = new Mutex(); | 63 mutex_ = new Mutex(); |
64 ASSERT(mutex_ != NULL); | 64 ASSERT(mutex_ != NULL); |
65 OS::RegisterCodeObservers(); | 65 OS::RegisterCodeObservers(); |
66 } | 66 } |
67 | 67 |
68 | 68 |
69 } // namespace dart | 69 } // namespace dart |
OLD | NEW |