| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // to raise its priority back up after lowering it if the process does not | 184 // to raise its priority back up after lowering it if the process does not |
| 185 // have a proper permission, e.g. CAP_SYS_NICE on Linux. A thread may not be | 185 // have a proper permission, e.g. CAP_SYS_NICE on Linux. A thread may not be |
| 186 // able to lower its priority back down after raising it to REALTIME_AUDIO. | 186 // able to lower its priority back down after raising it to REALTIME_AUDIO. |
| 187 // Since changing other threads' priority is not permitted in favor of | 187 // Since changing other threads' priority is not permitted in favor of |
| 188 // security, this interface is restricted to change only the current thread | 188 // security, this interface is restricted to change only the current thread |
| 189 // priority (https://crbug.com/399473). | 189 // priority (https://crbug.com/399473). |
| 190 static void SetCurrentThreadPriority(ThreadPriority priority); | 190 static void SetCurrentThreadPriority(ThreadPriority priority); |
| 191 | 191 |
| 192 static ThreadPriority GetCurrentThreadPriority(); | 192 static ThreadPriority GetCurrentThreadPriority(); |
| 193 | 193 |
| 194 static bool SetThreadPriority(PlatformThreadId tid, ThreadPriority priority); |
| 195 |
| 194 private: | 196 private: |
| 195 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); | 197 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); |
| 196 }; | 198 }; |
| 197 | 199 |
| 198 } // namespace base | 200 } // namespace base |
| 199 | 201 |
| 200 #endif // BASE_THREADING_PLATFORM_THREAD_H_ | 202 #endif // BASE_THREADING_PLATFORM_THREAD_H_ |
| OLD | NEW |