mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 17:00:51 +08:00
[CSRSRV] Use the PROCESS_PRIORITY_NORMAL_FOREGROUND constant instead of hardcoding its value (== 9).
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user