https://git.reactos.org/?p=reactos.git;a=commitdiff;h=944b942eb2904a2ff3bbf7...
commit 944b942eb2904a2ff3bbf7250b8a15f5d61e1c50 Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Wed Apr 20 03:20:18 2022 +0200 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Wed Apr 20 03:53:45 2022 +0200
[CSRSRV] Use the PROCESS_PRIORITY_NORMAL_FOREGROUND constant instead of hardcoding its value (== 9). --- subsystems/win32/csrsrv/procsup.c | 10 +++++----- subsystems/win32/csrss/csrss.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/subsystems/win32/csrsrv/procsup.c b/subsystems/win32/csrsrv/procsup.c index 13540d00d4e..8d00dc202a3 100644 --- a/subsystems/win32/csrsrv/procsup.c +++ b/subsystems/win32/csrsrv/procsup.c @@ -51,9 +51,9 @@ VOID NTAPI CsrSetToNormalPriority(VOID) { - KPRIORITY BasePriority = (8 + 1) + 4; + KPRIORITY BasePriority = PROCESS_PRIORITY_NORMAL_FOREGROUND + 4;
- /* Set the Priority */ + /* Set the base priority */ NtSetInformationProcess(NtCurrentProcess(), ProcessBasePriority, &BasePriority, @@ -79,7 +79,7 @@ VOID NTAPI CsrSetToShutdownPriority(VOID) { - KPRIORITY BasePriority = (8 + 1) + 6; + KPRIORITY BasePriority = PROCESS_PRIORITY_NORMAL_FOREGROUND + 6; BOOLEAN Old;
/* Get the shutdown privilege */ @@ -88,7 +88,7 @@ CsrSetToShutdownPriority(VOID) FALSE, &Old))) { - /* Set the Priority */ + /* Set the base priority */ NtSetInformationProcess(NtCurrentProcess(), ProcessBasePriority, &BasePriority, @@ -612,7 +612,7 @@ CsrCreateProcess(IN HANDLE hProcess, CsrProcess->ProcessHandle = hProcess; CsrProcess->ShutdownLevel = 0x280;
- /* Set the Priority to Background */ + /* Set the priority to Background */ CsrSetBackgroundPriority(CsrProcess);
/* Insert the Process */ diff --git a/subsystems/win32/csrss/csrss.c b/subsystems/win32/csrss/csrss.c index a4205d5f3b0..13b5189dbb8 100644 --- a/subsystems/win32/csrss/csrss.c +++ b/subsystems/win32/csrss/csrss.c @@ -41,7 +41,7 @@ _main(int argc, char *envp[], int DebugFlag) { - KPRIORITY BasePriority = (8 + 1) + 4; + KPRIORITY BasePriority = PROCESS_PRIORITY_NORMAL_FOREGROUND + 4; NTSTATUS Status; #if defined (_X86_) ULONG Response; @@ -49,11 +49,11 @@ _main(int argc, UNREFERENCED_PARAMETER(envp); UNREFERENCED_PARAMETER(DebugFlag);
- /* Set the Priority */ + /* Set the base priority */ NtSetInformationProcess(NtCurrentProcess(), ProcessBasePriority, &BasePriority, - sizeof(KPRIORITY)); + sizeof(BasePriority));
#if defined (_X86_) /* Give us IOPL so that we can access the VGA registers */