[ros-diffs] [dchapyshev] 41390: - Set high priority class for winlogon.exe

dchapyshev at svn.reactos.org dchapyshev at svn.reactos.org
Fri Jun 12 17:44:22 CEST 2009


Author: dchapyshev
Date: Fri Jun 12 19:44:21 2009
New Revision: 41390

URL: http://svn.reactos.org/svn/reactos?rev=41390&view=rev
Log:
- Set high priority class for winlogon.exe

Modified:
    trunk/reactos/subsystems/win32/csrss/init.c

Modified: trunk/reactos/subsystems/win32/csrss/init.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/init.c?rev=41390&r1=41389&r2=41390&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/init.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/init.c [iso-8859-1] Fri Jun 12 19:44:21 2009
@@ -639,6 +639,7 @@
 	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 @@
 		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;
 }



More information about the Ros-diffs mailing list