[base] Support ::GetThreadPriority() returning 3.
We have observed ::GetThreadPriority returning 3 after the thread priority is set to NORMAL on Windows 7. This CL adds code to correctly map 3 to ThreadPriority::NORMAL in PlatformThread::GetCurrentThreadPriority(). From documentation, that should only happen in a REALTIME_PRIORITY_CLASS process, but since we can't get the thread and process priority atomically, we can hardly add a robust DCHECK for that. Bug: 1014659, 872820 Change-Id: If43b9d46fd766dd1d22e0efaeafe0b738ee57d4f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1898209 Commit-Queue: François Doray <fdoray@chromium.org> Reviewed-by:Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#712564}
Showing
Please register or sign in to comment