| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // WARNING: You should *NOT* be using this class directly. PlatformThread is | 5 // WARNING: You should *NOT* be using this class directly. PlatformThread is |
| 6 // the low-level platform-specific abstraction to the OS's threading interface. | 6 // the low-level platform-specific abstraction to the OS's threading interface. |
| 7 // You should instead be using a message-loop driven Thread, see thread.h. | 7 // You should instead be using a message-loop driven Thread, see thread.h. |
| 8 | 8 |
| 9 #ifndef BASE_THREADING_PLATFORM_THREAD_H_ | 9 #ifndef BASE_THREADING_PLATFORM_THREAD_H_ |
| 10 #define BASE_THREADING_PLATFORM_THREAD_H_ | 10 #define BASE_THREADING_PLATFORM_THREAD_H_ |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 : handle_(handle), | 82 : handle_(handle), |
| 83 id_(0) { | 83 id_(0) { |
| 84 } | 84 } |
| 85 | 85 |
| 86 PlatformThreadHandle(Handle handle, | 86 PlatformThreadHandle(Handle handle, |
| 87 PlatformThreadId id) | 87 PlatformThreadId id) |
| 88 : handle_(handle), | 88 : handle_(handle), |
| 89 id_(id) { | 89 id_(id) { |
| 90 } | 90 } |
| 91 | 91 |
| 92 PlatformThreadId id() const { |
| 93 return id_; |
| 94 } |
| 95 |
| 92 bool is_equal(const PlatformThreadHandle& other) const { | 96 bool is_equal(const PlatformThreadHandle& other) const { |
| 93 return handle_ == other.handle_; | 97 return handle_ == other.handle_; |
| 94 } | 98 } |
| 95 | 99 |
| 96 bool is_null() const { | 100 bool is_null() const { |
| 97 return !handle_; | 101 return !handle_; |
| 98 } | 102 } |
| 99 | 103 |
| 100 Handle platform_handle() const { | 104 Handle platform_handle() const { |
| 101 return handle_; | 105 return handle_; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 199 |
| 196 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle); | 200 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle); |
| 197 | 201 |
| 198 private: | 202 private: |
| 199 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); | 203 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); |
| 200 }; | 204 }; |
| 201 | 205 |
| 202 } // namespace base | 206 } // namespace base |
| 203 | 207 |
| 204 #endif // BASE_THREADING_PLATFORM_THREAD_H_ | 208 #endif // BASE_THREADING_PLATFORM_THREAD_H_ |
| OLD | NEW |