From 3f9540dadd52dd76cde8b7d2a6a290c464fb0812 Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Fri, 12 Jun 2009 15:44:21 +0000 Subject: [PATCH] - Set high priority class for winlogon.exe svn path=/trunk/; revision=41390 --- reactos/subsystems/win32/csrss/init.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/reactos/subsystems/win32/csrss/init.c b/reactos/subsystems/win32/csrss/init.c index 58720a37514..53c10954843 100644 --- a/reactos/subsystems/win32/csrss/init.c +++ b/reactos/subsystems/win32/csrss/init.c @@ -639,6 +639,7 @@ CsrpRunWinlogon (int argc, char ** argv, char ** envp) UNICODE_STRING CommandLine; PRTL_USER_PROCESS_PARAMETERS ProcessParameters = NULL; RTL_USER_PROCESS_INFORMATION ProcessInfo; + PROCESS_PRIORITY_CLASS PriorityClass; DPRINT("CSR: %s called\n", __FUNCTION__); @@ -674,6 +675,19 @@ CsrpRunWinlogon (int argc, char ** argv, char ** envp) DPRINT1("SM: %s: loading winlogon.exe failed (Status=%08lx)\n", __FUNCTION__, Status); } + + PriorityClass.PriorityClass = PROCESS_PRIORITY_CLASS_HIGH; + PriorityClass.Foreground = FALSE; + + /* Set priority for process */ + if (!NT_SUCCESS(NtSetInformationProcess(ProcessInfo.ProcessHandle, + ProcessPriorityClass, + &PriorityClass, + sizeof(PROCESS_PRIORITY_CLASS)))) + { + DPRINT1("Unable to set process priority for winlogon.exe\n"); + } + ZwResumeThread(ProcessInfo.ThreadHandle, NULL); return Status; }