From 14e3b7395b95e906ffe6c9f2b5edcc49872f00bb Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Fri, 1 Jul 2005 03:03:06 +0000 Subject: [PATCH] PCH for csrss and win32csr, and remove rosrtl usage svn path=/trunk/; revision=16361 --- reactos/subsys/csrss/api/handle.c | 6 +----- reactos/subsys/csrss/api/process.c | 7 +------ reactos/subsys/csrss/api/user.c | 7 +------ reactos/subsys/csrss/api/wapi.c | 9 ++------- reactos/subsys/csrss/csrss.c | 8 +------- reactos/subsys/csrss/csrss.h | 17 +++++++++++++++++ reactos/subsys/csrss/csrss.xml | 1 + reactos/subsys/csrss/init.c | 8 +------- reactos/subsys/csrss/print.c | 8 ++++---- reactos/subsys/csrss/video.c | 11 +++++------ reactos/subsys/csrss/win32csr/conio.c | 15 +-------------- reactos/subsys/csrss/win32csr/desktopbg.c | 7 +------ reactos/subsys/csrss/win32csr/dllmain.c | 6 +----- reactos/subsys/csrss/win32csr/exitros.c | 8 +------- reactos/subsys/csrss/win32csr/guiconsole.c | 5 +---- reactos/subsys/csrss/win32csr/tuiconsole.c | 8 +------- reactos/subsys/csrss/win32csr/w32csr.h | 21 +++++++++++++++++++++ reactos/subsys/csrss/win32csr/win32csr.xml | 1 + 18 files changed, 62 insertions(+), 91 deletions(-) create mode 100644 reactos/subsys/csrss/csrss.h create mode 100644 reactos/subsys/csrss/win32csr/w32csr.h diff --git a/reactos/subsys/csrss/api/handle.c b/reactos/subsys/csrss/api/handle.c index 8ee6758a408..9e2bc3124bc 100644 --- a/reactos/subsys/csrss/api/handle.c +++ b/reactos/subsys/csrss/api/handle.c @@ -9,11 +9,7 @@ /* INCLUDES ******************************************************************/ -#include -#define NTOS_MODE_USER -#include - -#include "api.h" +#include "csrss.h" #define NDEBUG #include diff --git a/reactos/subsys/csrss/api/process.c b/reactos/subsys/csrss/api/process.c index 4aa4ce460d6..b8d48bf2e5e 100644 --- a/reactos/subsys/csrss/api/process.c +++ b/reactos/subsys/csrss/api/process.c @@ -9,12 +9,7 @@ /* INCLUDES ******************************************************************/ -#include -#define NTOS_MODE_USER -#include - -#include "api.h" -#include "conio.h" +#include "csrss.h" #define NDEBUG #include diff --git a/reactos/subsys/csrss/api/user.c b/reactos/subsys/csrss/api/user.c index 44abd2d45c3..57cae1297ba 100644 --- a/reactos/subsys/csrss/api/user.c +++ b/reactos/subsys/csrss/api/user.c @@ -9,16 +9,11 @@ /* INCLUDES ******************************************************************/ -#include -#define NTOS_MODE_USER -#include - -#include "api.h" +#include "csrss.h" #define NDEBUG #include - /* GLOBALS *******************************************************************/ static BOOLEAN ServicesProcessIdValid = FALSE; diff --git a/reactos/subsys/csrss/api/wapi.c b/reactos/subsys/csrss/api/wapi.c index 5326472b5c6..75859259f9f 100644 --- a/reactos/subsys/csrss/api/wapi.c +++ b/reactos/subsys/csrss/api/wapi.c @@ -10,12 +10,7 @@ /* INCLUDES ******************************************************************/ -#include -#define NTOS_MODE_USER -#include -#include - -#include "api.h" +#include "csrss.h" #define NDEBUG #include @@ -170,7 +165,7 @@ ClientConnectionThread(HANDLE ServerPort) /* Close the port and exit the thread */ NtClose(ServerPort); - RtlRosExitUserThread(STATUS_SUCCESS); + NtTerminateThread(NtCurrentThread(), STATUS_SUCCESS); } /********************************************************************** diff --git a/reactos/subsys/csrss/csrss.c b/reactos/subsys/csrss/csrss.c index 5a7b163ce7e..177a588faa5 100644 --- a/reactos/subsys/csrss/csrss.c +++ b/reactos/subsys/csrss/csrss.c @@ -32,13 +32,7 @@ * actually does nothing but running). */ -#include -#define NTOS_MODE_USER -#include -#include -#include - -#include "api.h" +#include "csrss.h" #define NDEBUG #include diff --git a/reactos/subsys/csrss/csrss.h b/reactos/subsys/csrss/csrss.h new file mode 100644 index 00000000000..7bc5e6d4391 --- /dev/null +++ b/reactos/subsys/csrss/csrss.h @@ -0,0 +1,17 @@ +/* PSDK/NDK Headers */ +#include +#define NTOS_MODE_USER +#include + +/* Build Number */ +#include + +/* Subsystem Manager Header */ +#include + +/* Internal CSRSS Headers */ +#include +#include +#include + +/* EOF */ diff --git a/reactos/subsys/csrss/csrss.xml b/reactos/subsys/csrss/csrss.xml index 40aa5fbfd16..dceffa32697 100644 --- a/reactos/subsys/csrss/csrss.xml +++ b/reactos/subsys/csrss/csrss.xml @@ -13,6 +13,7 @@ user.c wapi.c + csrss.h csrss.c init.c print.c diff --git a/reactos/subsys/csrss/init.c b/reactos/subsys/csrss/init.c index 5dc146886e4..7e931de4f83 100644 --- a/reactos/subsys/csrss/init.c +++ b/reactos/subsys/csrss/init.c @@ -10,13 +10,7 @@ /* INCLUDES ******************************************************************/ -#include -#define NTOS_MODE_USER -#include -#include - -#include "api.h" -#include "csrplugin.h" +#include "csrss.h" #define NDEBUG #include diff --git a/reactos/subsys/csrss/print.c b/reactos/subsys/csrss/print.c index 87862afa4d2..a0edc3d0fe2 100644 --- a/reactos/subsys/csrss/print.c +++ b/reactos/subsys/csrss/print.c @@ -27,10 +27,10 @@ * Compiled successfully with egcs 1.1.2 */ -#include -#define NTOS_MODE_USER -#include -#include +#include "csrss.h" + +#define NDEBUG +#include VOID STDCALL DisplayString(LPCWSTR lpwString) { diff --git a/reactos/subsys/csrss/video.c b/reactos/subsys/csrss/video.c index 3964addbe2e..4b7642b9845 100644 --- a/reactos/subsys/csrss/video.c +++ b/reactos/subsys/csrss/video.c @@ -3,16 +3,16 @@ * ReactOS Project */ -#include -#define NTOS_MODE_USER -#include -#include +#include "csrss.h" + +#define NDEBUG +#include ULONG InitializeVideoAddressSpace(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING PhysMemName; + UNICODE_STRING PhysMemName = RTL_CONSTANT_STRING(L"\\Device\\PhysicalMemory"); NTSTATUS Status; HANDLE PhysMemHandle; PVOID BaseAddress; @@ -25,7 +25,6 @@ InitializeVideoAddressSpace(VOID) /* * Open the physical memory section */ - RtlRosInitUnicodeStringFromLiteral(&PhysMemName, L"\\Device\\PhysicalMemory"); InitializeObjectAttributes(&ObjectAttributes, &PhysMemName, 0, diff --git a/reactos/subsys/csrss/win32csr/conio.c b/reactos/subsys/csrss/win32csr/conio.c index b676da8ffe4..7c127ba2486 100644 --- a/reactos/subsys/csrss/win32csr/conio.c +++ b/reactos/subsys/csrss/win32csr/conio.c @@ -8,20 +8,7 @@ /* INCLUDES ******************************************************************/ -#include -#define NTOS_MODE_USER -#include -#include -#include - -#include - -#include "api.h" -#include "conio.h" -#include "desktopbg.h" -#include "guiconsole.h" -#include "tuiconsole.h" -#include "win32csr.h" +#include "w32csr.h" #define NDEBUG #include diff --git a/reactos/subsys/csrss/win32csr/desktopbg.c b/reactos/subsys/csrss/win32csr/desktopbg.c index 1f183de5449..c21beeb023d 100644 --- a/reactos/subsys/csrss/win32csr/desktopbg.c +++ b/reactos/subsys/csrss/win32csr/desktopbg.c @@ -7,12 +7,7 @@ * ReactOS Operating System */ -#include -#define NTOS_MODE_USER -#include - -#include "api.h" -#include "desktopbg.h" +#include "w32csr.h" #define NDEBUG #include diff --git a/reactos/subsys/csrss/win32csr/dllmain.c b/reactos/subsys/csrss/win32csr/dllmain.c index d65e8a91cc9..b4fb3f78858 100644 --- a/reactos/subsys/csrss/win32csr/dllmain.c +++ b/reactos/subsys/csrss/win32csr/dllmain.c @@ -8,11 +8,7 @@ /* INCLUDES ******************************************************************/ -#include -#include "csrplugin.h" -#include "conio.h" -#include "desktopbg.h" -#include "guiconsole.h" +#include "w32csr.h" #define NDEBUG #include diff --git a/reactos/subsys/csrss/win32csr/exitros.c b/reactos/subsys/csrss/win32csr/exitros.c index f94ab4c10db..b94066d9641 100644 --- a/reactos/subsys/csrss/win32csr/exitros.c +++ b/reactos/subsys/csrss/win32csr/exitros.c @@ -8,13 +8,7 @@ /* INCLUDES ******************************************************************/ -#include -#define NTOS_MODE_USER -#include -#include - -#include "api.h" -#include "win32csr.h" +#include "w32csr.h" #define NDEBUG #include diff --git a/reactos/subsys/csrss/win32csr/guiconsole.c b/reactos/subsys/csrss/win32csr/guiconsole.c index 325aa8d9c26..54dfd436dce 100644 --- a/reactos/subsys/csrss/win32csr/guiconsole.c +++ b/reactos/subsys/csrss/win32csr/guiconsole.c @@ -8,10 +8,7 @@ /* INCLUDES ******************************************************************/ -#include -#include "conio.h" -#include "guiconsole.h" -#include "win32csr.h" +#include "w32csr.h" #define NDEBUG #include diff --git a/reactos/subsys/csrss/win32csr/tuiconsole.c b/reactos/subsys/csrss/win32csr/tuiconsole.c index 9a8623482f7..5aebf166c83 100644 --- a/reactos/subsys/csrss/win32csr/tuiconsole.c +++ b/reactos/subsys/csrss/win32csr/tuiconsole.c @@ -6,13 +6,7 @@ * PURPOSE: Implementation of text-mode consoles */ -#include -#include -#include -#include "api.h" -#include "conio.h" -#include "tuiconsole.h" -#include "win32csr.h" +#include "w32csr.h" #define NDEBUG #include diff --git a/reactos/subsys/csrss/win32csr/w32csr.h b/reactos/subsys/csrss/win32csr/w32csr.h new file mode 100644 index 00000000000..a2488a7c4fe --- /dev/null +++ b/reactos/subsys/csrss/win32csr/w32csr.h @@ -0,0 +1,21 @@ +/* PSDK/NDK Headers */ +#include +#define NTOS_MODE_USER +#include + +/* Our own BLUE.SYS Driver for Console Output */ +#include + +/* External Winlogon Header */ +#include + +/* Internal CSRSS Headers */ +#include +#include +#include +#include +#include "guiconsole.h" +#include "tuiconsole.h" +#include + +/* EOF */ diff --git a/reactos/subsys/csrss/win32csr/win32csr.xml b/reactos/subsys/csrss/win32csr/win32csr.xml index b6f846394cc..eab0d1f1684 100644 --- a/reactos/subsys/csrss/win32csr/win32csr.xml +++ b/reactos/subsys/csrss/win32csr/win32csr.xml @@ -8,6 +8,7 @@ kernel32 user32 gdi32 + w32csr.h conio.c desktopbg.c dllmain.c