| 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 #ifndef RUNTIME_VM_OS_THREAD_H_ | 5 #ifndef RUNTIME_VM_OS_THREAD_H_ |
| 6 #define RUNTIME_VM_OS_THREAD_H_ | 6 #define RUNTIME_VM_OS_THREAD_H_ |
| 7 | 7 |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 private: | 284 private: |
| 285 void Lock(); | 285 void Lock(); |
| 286 bool TryLock(); // Returns false if lock is busy and locking failed. | 286 bool TryLock(); // Returns false if lock is busy and locking failed. |
| 287 void Unlock(); | 287 void Unlock(); |
| 288 | 288 |
| 289 MutexData data_; | 289 MutexData data_; |
| 290 #if defined(DEBUG) | 290 #if defined(DEBUG) |
| 291 ThreadId owner_; | 291 ThreadId owner_; |
| 292 #endif // defined(DEBUG) | 292 #endif // defined(DEBUG) |
| 293 | 293 |
| 294 friend class MallocLocker; |
| 294 friend class MutexLocker; | 295 friend class MutexLocker; |
| 295 friend class SafepointMutexLocker; | 296 friend class SafepointMutexLocker; |
| 296 friend class OSThreadIterator; | 297 friend class OSThreadIterator; |
| 297 friend class TimelineEventBlockIterator; | 298 friend class TimelineEventBlockIterator; |
| 298 friend class TimelineEventRecorder; | 299 friend class TimelineEventRecorder; |
| 299 friend class PageSpace; | 300 friend class PageSpace; |
| 300 friend void Dart_TestMutex(); | 301 friend void Dart_TestMutex(); |
| 301 DISALLOW_COPY_AND_ASSIGN(Mutex); | 302 DISALLOW_COPY_AND_ASSIGN(Mutex); |
| 302 }; | 303 }; |
| 303 | 304 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 friend class SafepointMonitorLocker; | 345 friend class SafepointMonitorLocker; |
| 345 friend void Dart_TestMonitor(); | 346 friend void Dart_TestMonitor(); |
| 346 DISALLOW_COPY_AND_ASSIGN(Monitor); | 347 DISALLOW_COPY_AND_ASSIGN(Monitor); |
| 347 }; | 348 }; |
| 348 | 349 |
| 349 | 350 |
| 350 } // namespace dart | 351 } // namespace dart |
| 351 | 352 |
| 352 | 353 |
| 353 #endif // RUNTIME_VM_OS_THREAD_H_ | 354 #endif // RUNTIME_VM_OS_THREAD_H_ |
| OLD | NEW |