| 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 VM_OS_THREAD_H_ | 5 #ifndef VM_OS_THREAD_H_ |
| 6 #define VM_OS_THREAD_H_ | 6 #define 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 ThreadId trace_id() const { | 69 ThreadId trace_id() const { |
| 70 ASSERT(trace_id_ != OSThread::kInvalidThreadJoinId); | 70 ASSERT(trace_id_ != OSThread::kInvalidThreadJoinId); |
| 71 return trace_id_; | 71 return trace_id_; |
| 72 } | 72 } |
| 73 | 73 |
| 74 const char* name() const { | 74 const char* name() const { |
| 75 return name_; | 75 return name_; |
| 76 } | 76 } |
| 77 | 77 |
| 78 void SetName(const char* name); |
| 79 |
| 78 void set_name(const char* name) { | 80 void set_name(const char* name) { |
| 79 ASSERT(OSThread::Current() == this); | 81 ASSERT(OSThread::Current() == this); |
| 80 ASSERT(name_ == NULL); | 82 ASSERT(name_ == NULL); |
| 81 ASSERT(name != NULL); | 83 ASSERT(name != NULL); |
| 82 name_ = strdup(name); | 84 name_ = strdup(name); |
| 83 } | 85 } |
| 84 | 86 |
| 85 Mutex* timeline_block_lock() const { | 87 Mutex* timeline_block_lock() const { |
| 86 return timeline_block_lock_; | 88 return timeline_block_lock_; |
| 87 } | 89 } |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 friend class SafepointMonitorLocker; | 345 friend class SafepointMonitorLocker; |
| 344 friend void Dart_TestMonitor(); | 346 friend void Dart_TestMonitor(); |
| 345 DISALLOW_COPY_AND_ASSIGN(Monitor); | 347 DISALLOW_COPY_AND_ASSIGN(Monitor); |
| 346 }; | 348 }; |
| 347 | 349 |
| 348 | 350 |
| 349 } // namespace dart | 351 } // namespace dart |
| 350 | 352 |
| 351 | 353 |
| 352 #endif // VM_OS_THREAD_H_ | 354 #endif // VM_OS_THREAD_H_ |
| OLD | NEW |