mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 05:28:14 +00:00
[CSRSRV] Use the PROCESS_PRIORITY_NORMAL_FOREGROUND constant instead of hardcoding its value (== 9).
This commit is contained in:
parent
27453fb759
commit
944b942eb2
2 changed files with 8 additions and 8 deletions
|
@ -51,9 +51,9 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
CsrSetToNormalPriority(VOID)
|
CsrSetToNormalPriority(VOID)
|
||||||
{
|
{
|
||||||
KPRIORITY BasePriority = (8 + 1) + 4;
|
KPRIORITY BasePriority = PROCESS_PRIORITY_NORMAL_FOREGROUND + 4;
|
||||||
|
|
||||||
/* Set the Priority */
|
/* Set the base priority */
|
||||||
NtSetInformationProcess(NtCurrentProcess(),
|
NtSetInformationProcess(NtCurrentProcess(),
|
||||||
ProcessBasePriority,
|
ProcessBasePriority,
|
||||||
&BasePriority,
|
&BasePriority,
|
||||||
|
@ -79,7 +79,7 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
CsrSetToShutdownPriority(VOID)
|
CsrSetToShutdownPriority(VOID)
|
||||||
{
|
{
|
||||||
KPRIORITY BasePriority = (8 + 1) + 6;
|
KPRIORITY BasePriority = PROCESS_PRIORITY_NORMAL_FOREGROUND + 6;
|
||||||
BOOLEAN Old;
|
BOOLEAN Old;
|
||||||
|
|
||||||
/* Get the shutdown privilege */
|
/* Get the shutdown privilege */
|
||||||
|
@ -88,7 +88,7 @@ CsrSetToShutdownPriority(VOID)
|
||||||
FALSE,
|
FALSE,
|
||||||
&Old)))
|
&Old)))
|
||||||
{
|
{
|
||||||
/* Set the Priority */
|
/* Set the base priority */
|
||||||
NtSetInformationProcess(NtCurrentProcess(),
|
NtSetInformationProcess(NtCurrentProcess(),
|
||||||
ProcessBasePriority,
|
ProcessBasePriority,
|
||||||
&BasePriority,
|
&BasePriority,
|
||||||
|
@ -612,7 +612,7 @@ CsrCreateProcess(IN HANDLE hProcess,
|
||||||
CsrProcess->ProcessHandle = hProcess;
|
CsrProcess->ProcessHandle = hProcess;
|
||||||
CsrProcess->ShutdownLevel = 0x280;
|
CsrProcess->ShutdownLevel = 0x280;
|
||||||
|
|
||||||
/* Set the Priority to Background */
|
/* Set the priority to Background */
|
||||||
CsrSetBackgroundPriority(CsrProcess);
|
CsrSetBackgroundPriority(CsrProcess);
|
||||||
|
|
||||||
/* Insert the Process */
|
/* Insert the Process */
|
||||||
|
|
|
@ -41,7 +41,7 @@ _main(int argc,
|
||||||
char *envp[],
|
char *envp[],
|
||||||
int DebugFlag)
|
int DebugFlag)
|
||||||
{
|
{
|
||||||
KPRIORITY BasePriority = (8 + 1) + 4;
|
KPRIORITY BasePriority = PROCESS_PRIORITY_NORMAL_FOREGROUND + 4;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
#if defined (_X86_)
|
#if defined (_X86_)
|
||||||
ULONG Response;
|
ULONG Response;
|
||||||
|
@ -49,11 +49,11 @@ _main(int argc,
|
||||||
UNREFERENCED_PARAMETER(envp);
|
UNREFERENCED_PARAMETER(envp);
|
||||||
UNREFERENCED_PARAMETER(DebugFlag);
|
UNREFERENCED_PARAMETER(DebugFlag);
|
||||||
|
|
||||||
/* Set the Priority */
|
/* Set the base priority */
|
||||||
NtSetInformationProcess(NtCurrentProcess(),
|
NtSetInformationProcess(NtCurrentProcess(),
|
||||||
ProcessBasePriority,
|
ProcessBasePriority,
|
||||||
&BasePriority,
|
&BasePriority,
|
||||||
sizeof(KPRIORITY));
|
sizeof(BasePriority));
|
||||||
|
|
||||||
#if defined (_X86_)
|
#if defined (_X86_)
|
||||||
/* Give us IOPL so that we can access the VGA registers */
|
/* Give us IOPL so that we can access the VGA registers */
|
||||||
|
|
Loading…
Reference in a new issue