mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:35:41 +00:00
[KERNEL32]: Bug #42: GetThreadPriority was only returning -2, -1, 0, 1, 2 or 15 and -15. For realtime threads, priorities of 3, 4, 5, 6, 7, and their negatives, are also valid. Also, GetThreadPriority was returning -15/15 for any priorty outside the -2/2 range, instead of just the special saturation values (I should count this as a separate bug, really...)
svn path=/trunk/; revision=52802
This commit is contained in:
parent
0d4067e028
commit
e6a3064cd7
1 changed files with 5 additions and 3 deletions
|
@ -621,13 +621,15 @@ GetThreadPriority(HANDLE hThread)
|
||||||
return THREAD_PRIORITY_ERROR_RETURN;
|
return THREAD_PRIORITY_ERROR_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do some conversions for out of boundary values */
|
/* Do some conversions for saturation values */
|
||||||
if (ThreadBasic.BasePriority > THREAD_BASE_PRIORITY_MAX)
|
if (ThreadBasic.BasePriority == ((HIGH_PRIORITY + 1) / 2))
|
||||||
{
|
{
|
||||||
|
/* Win32 calls this "time critical" */
|
||||||
ThreadBasic.BasePriority = THREAD_PRIORITY_TIME_CRITICAL;
|
ThreadBasic.BasePriority = THREAD_PRIORITY_TIME_CRITICAL;
|
||||||
}
|
}
|
||||||
else if (ThreadBasic.BasePriority < THREAD_BASE_PRIORITY_MIN)
|
else if (ThreadBasic.BasePriority == -((HIGH_PRIORITY + 1) / 2))
|
||||||
{
|
{
|
||||||
|
/* Win32 calls this "idle" */
|
||||||
ThreadBasic.BasePriority = THREAD_PRIORITY_IDLE;
|
ThreadBasic.BasePriority = THREAD_PRIORITY_IDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue