From: Hermès Bélusca-Maïto Date: Tue, 20 Nov 2012 19:34:03 +0000 (+0000) Subject: [CSRSRV] X-Git-Tag: backups/ros-csrss@60644~124 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=ae88c763da8f19938b2fc35698db9a48c64b82a2 [CSRSRV] - Remove unused functions CallHardError and CsrHandleHardError (in fact calling the hard error callback is already done in the listening thread). - Add an annotation and correct a typographical error; remove old comments. - Remove the now unneeded csrplugin.h header (a relic of the old callback system of the old csrss/csrsrv). svn path=/branches/ros-csrss/; revision=57741 --- diff --git a/subsystems/win32/csrsrv/api.c b/subsystems/win32/csrsrv/api.c index 854a26e37d9..0f4c60cbaf3 100644 --- a/subsystems/win32/csrsrv/api.c +++ b/subsystems/win32/csrsrv/api.c @@ -24,24 +24,6 @@ extern ULONG CsrMaxApiRequestThreads; /* FUNCTIONS ******************************************************************/ -VOID -CallHardError(IN PCSR_THREAD ThreadData, - IN PHARDERROR_MSG HardErrorMessage); - -#if 0 -static -VOID -NTAPI -CsrHandleHardError(IN PCSR_THREAD ThreadData, - IN OUT PHARDERROR_MSG Message) -{ - DPRINT1("CSR: received hard error %lx\n", Message->Status); - - /* Call the hard error handler in win32csr */ - CallHardError(ThreadData, Message); -} -#endif - /*++ * @name CsrCallServerFromServer * @implemented NT4 @@ -626,7 +608,7 @@ CsrApiRequestThread(IN PVOID Parameter) if ((ServerDll) && (ServerDll->HardErrorCallback)) { /* Call it */ - ServerDll->HardErrorCallback(NULL /* CsrThread */, HardErrorMsg); + ServerDll->HardErrorCallback(NULL /* CsrThread == NULL */, HardErrorMsg); /* If it's handled, get out of here */ if (HardErrorMsg->Response != ResponseNotHandled) break; @@ -1141,7 +1123,7 @@ CsrConnectToUser(VOID) &hUser32); RtlFreeUnicodeString(&TempName); - /* If we got teh handle, get the Client Thread Startup Entrypoint */ + /* If we got the handle, get the Client Thread Startup Entrypoint */ if (NT_SUCCESS(Status)) { RtlInitAnsiString(&StartupName,"ClientThreadSetup"); diff --git a/subsystems/win32/csrsrv/include/csrplugin.h b/subsystems/win32/csrsrv/include/csrplugin.h deleted file mode 100644 index 6b0ed95524f..00000000000 --- a/subsystems/win32/csrsrv/include/csrplugin.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/include/csrplugin.h - * PURPOSE: CSRSS plugin interface - */ - -/* - * CSRSS is a native application and can only implicitly link against native - * DLLs. Since e.g. user32.dll and gdi32.dll are win32 DLLs and not native - * DLLs it is not possible to call functions in those DLLs directly from - * CSRSS. - * However, it is possible to explicitly load a non-native DLL. Such a DLL - * can then in turn be implicitly linked against other DLLs in its own - * subsystem. - */ - -#pragma once - -#include - -#include -//#include "api.h" - -/* -typedef NTSTATUS (WINAPI *CSRSS_ENUM_PROCESSES_PROC)(CSRSS_ENUM_PROCESS_PROC EnumProc, - PVOID Context); -typedef NTSTATUS (WINAPI *CSRSS_ENUM_PROCESS_PROC)(PCSR_PROCESS ProcessData, - PVOID Context); - -typedef struct tagCSRSS_EXPORTED_FUNCS -{ - CSRSS_ENUM_PROCESSES_PROC CsrEnumProcessesProc; -} CSRSS_EXPORTED_FUNCS, *PCSRSS_EXPORTED_FUNCS; -*/ - -typedef BOOL (WINAPI *CSRPLUGIN_INIT_COMPLETE_PROC)(void); - -typedef VOID (WINAPI *CSRPLUGIN_HARDERROR_PROC)(IN PCSR_THREAD ThreadData, - IN PHARDERROR_MSG HardErrorMessage); - -typedef NTSTATUS (WINAPI *CSRPLUGIN_PROCESS_INHERIT_PROC)(IN PCSR_PROCESS SourceProcessData, - IN PCSR_PROCESS TargetProcessData); - -typedef ULONG (WINAPI *CSRPLUGIN_PROCESS_DELETED_PROC)(IN PCSR_PROCESS ProcessData, IN ULONG Unused, IN BOOLEAN Flag); - -typedef struct tagCSRSS_SERVER_PROCS -{ - CSRPLUGIN_INIT_COMPLETE_PROC InitCompleteProc; - CSRPLUGIN_HARDERROR_PROC HardErrorProc; - CSRPLUGIN_PROCESS_INHERIT_PROC ProcessInheritProc; - CSRPLUGIN_PROCESS_DELETED_PROC ProcessDeletedProc; -} CSRPLUGIN_SERVER_PROCS, *PCSRPLUGIN_SERVER_PROCS; - -typedef BOOL (WINAPI *CSRPLUGIN_INITIALIZE_PROC)(PCSRSS_API_DEFINITION *ApiDefinitions, - PCSRPLUGIN_SERVER_PROCS ServerProcs); - -/* EOF */ diff --git a/subsystems/win32/csrsrv/init.c b/subsystems/win32/csrsrv/init.c index 6bda6ba3a99..fa878988811 100644 --- a/subsystems/win32/csrsrv/init.c +++ b/subsystems/win32/csrsrv/init.c @@ -38,29 +38,6 @@ SYSTEM_BASIC_INFORMATION CsrNtSysInfo; /* PRIVATE FUNCTIONS **********************************************************/ -VOID -CallHardError(IN PCSR_THREAD ThreadData, - IN PHARDERROR_MSG HardErrorMessage) -{ - ULONG i; - PCSR_SERVER_DLL ServerDll; - - DPRINT("CSR: %s called\n", __FUNCTION__); - - /* Notify the Server DLLs */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the current Server DLL */ - ServerDll = CsrLoadedServerDll[i]; - - /* Make sure it's valid and that it has callback */ - if (ServerDll && ServerDll->HardErrorCallback) - { - ServerDll->HardErrorCallback(ThreadData, HardErrorMessage); - } - } -} - /* === INIT ROUTINES === */ /*++ diff --git a/subsystems/win32/csrsrv/procsup.c b/subsystems/win32/csrsrv/procsup.c index 052b79c3cf1..08c806accfb 100644 --- a/subsystems/win32/csrsrv/procsup.c +++ b/subsystems/win32/csrsrv/procsup.c @@ -32,9 +32,9 @@ extern ULONG CsrTotalPerProcessDataLength; /* PRIVATE FUNCTIONS **********************************************************/ /*++ - * @name CsrpSetToNormalPriority + * @name CsrSetToNormalPriority * - * The CsrpSetToNormalPriority routine sets the current NT Process' + * The CsrSetToNormalPriority routine sets the current NT Process' * priority to the normal priority for CSR Processes. * * @param None. @@ -47,7 +47,7 @@ extern ULONG CsrTotalPerProcessDataLength; *--*/ VOID NTAPI -CsrSetToNormalPriority(VOID) // CsrpSetToNormalPriority +CsrSetToNormalPriority(VOID) { KPRIORITY BasePriority = (8 + 1) + 4; @@ -59,9 +59,9 @@ CsrSetToNormalPriority(VOID) // CsrpSetToNormalPriority } /*++ - * @name CsrpSetToShutdownPriority + * @name CsrSetToShutdownPriority * - * The CsrpSetToShutdownPriority routine sets the current NT Process' + * The CsrSetToShutdownPriority routine sets the current NT Process' * priority to the boosted priority for CSR Processes doing shutdown. * Additonally, it acquires the Shutdown Privilege required for shutdown. * @@ -75,7 +75,7 @@ CsrSetToNormalPriority(VOID) // CsrpSetToNormalPriority *--*/ VOID NTAPI -CsrSetToShutdownPriority(VOID) // CsrpSetToShutdownPriority +CsrSetToShutdownPriority(VOID) { KPRIORITY SetBasePriority = (8 + 1) + 6; BOOLEAN Old; @@ -1288,7 +1288,6 @@ CsrShutdownProcesses(IN PLUID CallerLuid, } /* Set shudown Priority */ - // CsrpSetToShutdownPriority(); CsrSetToShutdownPriority(); /* Start looping */ @@ -1365,7 +1364,6 @@ CsrShutdownProcesses(IN PLUID CallerLuid, Quickie: /* Return to normal priority */ - // CsrpSetToNormalPriority(); CsrSetToNormalPriority(); return Status; diff --git a/subsystems/win32/csrsrv/wait.c b/subsystems/win32/csrsrv/wait.c index 571bc241172..6aabc03013f 100644 --- a/subsystems/win32/csrsrv/wait.c +++ b/subsystems/win32/csrsrv/wait.c @@ -163,7 +163,7 @@ CsrNotifyWaitBlock(IN PCSR_WAIT_BLOCK WaitBlock, RemoveEntryList(&WaitBlock->UserWaitList); } - /* Dereference teh thread */ + /* Dereference the thread */ CsrDereferenceThread(WaitBlock->WaitThread); /* Free the wait block */