Index: base/threading/platform_thread_linux.cc |
diff --git a/base/threading/platform_thread_linux.cc b/base/threading/platform_thread_linux.cc |
index e0f620e198a4dbe2a5bd6a6da1859589c67119e1..48cf7443f7d5156b31624318bc0a18d2aba35e5c 100644 |
--- a/base/threading/platform_thread_linux.cc |
+++ b/base/threading/platform_thread_linux.cc |
@@ -38,12 +38,11 @@ const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4] = { |
{ThreadPriority::REALTIME_AUDIO, -10}, |
}; |
-bool SetThreadPriorityForPlatform(PlatformThreadHandle handle, |
- ThreadPriority priority) { |
+bool SetCurrentThreadPriorityForPlatform(ThreadPriority priority) { |
#if !defined(OS_NACL) |
ThreadPriority current_priority; |
if (priority != ThreadPriority::REALTIME_AUDIO && |
- GetThreadPriorityForPlatform(handle, ¤t_priority) && |
+ GetCurrentThreadPriorityForPlatform(¤t_priority) && |
current_priority == ThreadPriority::REALTIME_AUDIO) { |
// If the pthread's round-robin scheduler is already enabled, and the new |
// priority will use setpriority() instead, the pthread scheduler should be |
@@ -51,8 +50,6 @@ bool SetThreadPriorityForPlatform(PlatformThreadHandle handle, |
pthread_setschedparam(pthread_self(), SCHED_OTHER, &kResetPrio); |
return false; |
} |
- // TODO(gab): Assess the correctness of using |pthread_self()| below instead |
- // of |handle|. http://crbug.com/468793. |
return priority == ThreadPriority::REALTIME_AUDIO && |
pthread_setschedparam(pthread_self(), SCHED_RR, &kRealTimePrio) == 0; |
#else |
@@ -60,13 +57,10 @@ bool SetThreadPriorityForPlatform(PlatformThreadHandle handle, |
#endif |
} |
-bool GetThreadPriorityForPlatform(PlatformThreadHandle handle, |
- ThreadPriority* priority) { |
+bool GetCurrentThreadPriorityForPlatform(ThreadPriority* priority) { |
#if !defined(OS_NACL) |
int maybe_sched_rr = 0; |
struct sched_param maybe_realtime_prio = {0}; |
- // TODO(gab): Assess the correctness of using |pthread_self()| below instead |
- // of |handle|. http://crbug.com/468793. |
if (pthread_getschedparam(pthread_self(), &maybe_sched_rr, |
&maybe_realtime_prio) == 0 && |
maybe_sched_rr == SCHED_RR && |