[REACTOS]
[reactos.git] / reactos / subsystems / win32 / csrss / csrss.c
index 06f5e2e..1aae70a 100644 (file)
@@ -1,22 +1,19 @@
 /*
- * PROJECT:         ReactOS Client Server Runtime SubSystem (CSRSS)
  * LICENSE:         BSD - See COPYING.ARM in root directory
+ * PROJECT:         ReactOS Client/Server Runtime SubSystem
  * FILE:            subsystems/win32/csrss/csrss.c
- * PURPOSE:         Main Executable Code
- * PROGRAMMERS:     Alex Ionescu
+ * PURPOSE:         CSRSS Process Main Executable Code
+ * PROGRAMMERS:     Alex Ionescu (alex@relsoft.net)
  *                  ReactOS Portable Systems Group
  */
 
 /* INCLUDES *******************************************************************/
 
-#define WIN32_NO_STATUS
 #define NTOS_MODE_USER
+#include <ndk/psfuncs.h>
+#include <ndk/rtlfuncs.h>
 
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <wincon.h>
-#include <api.h>
+#include <csr/csrsrv.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -45,7 +42,7 @@ _main(int argc,
 {
     KPRIORITY BasePriority = (8 + 1) + 4;
     NTSTATUS Status;
-    //ULONG Response;
+    //ULONG Response; // see the #if 0
     UNREFERENCED_PARAMETER(envp);
     UNREFERENCED_PARAMETER(DebugFlag);
 
@@ -87,7 +84,7 @@ _main(int argc,
     CsrpSetDefaultProcessHardErrorMode();
 
     /* If this is Session 0, make sure killing us bugchecks the system */
-    if (!NtCurrentPeb()->SessionId) RtlSetProcessIsCritical(TRUE, NULL, FALSE);
+    if (NtCurrentPeb()->SessionId == 0) RtlSetProcessIsCritical(TRUE, NULL, FALSE);
 
     /* Kill this thread. CSRSRV keeps us going */
     NtTerminateThread(NtCurrentThread(), Status);