Author: hbelusca Date: Tue Nov 20 19:34:03 2012 New Revision: 57741
URL: http://svn.reactos.org/svn/reactos?rev=57741&view=rev Log: [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).
Removed: branches/ros-csrss/subsystems/win32/csrsrv/include/csrplugin.h Modified: branches/ros-csrss/subsystems/win32/csrsrv/api.c branches/ros-csrss/subsystems/win32/csrsrv/init.c branches/ros-csrss/subsystems/win32/csrsrv/procsup.c branches/ros-csrss/subsystems/win32/csrsrv/wait.c
Modified: branches/ros-csrss/subsystems/win32/csrsrv/api.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrsr... ============================================================================== --- branches/ros-csrss/subsystems/win32/csrsrv/api.c [iso-8859-1] (original) +++ branches/ros-csrss/subsystems/win32/csrsrv/api.c [iso-8859-1] Tue Nov 20 19:34:03 2012 @@ -23,24 +23,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 @@ -626,7 +608,7 @@ 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 @@ &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");
Removed: branches/ros-csrss/subsystems/win32/csrsrv/include/csrplugin.h URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrsr... ============================================================================== --- branches/ros-csrss/subsystems/win32/csrsrv/include/csrplugin.h [iso-8859-1] (original) +++ branches/ros-csrss/subsystems/win32/csrsrv/include/csrplugin.h (removed) @@ -1,58 +1,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 <windows.h> - -#include <csr/csr.h> -//#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 */
Modified: branches/ros-csrss/subsystems/win32/csrsrv/init.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrsr... ============================================================================== --- branches/ros-csrss/subsystems/win32/csrsrv/init.c [iso-8859-1] (original) +++ branches/ros-csrss/subsystems/win32/csrsrv/init.c [iso-8859-1] Tue Nov 20 19:34:03 2012 @@ -37,29 +37,6 @@
/* 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 === */
Modified: branches/ros-csrss/subsystems/win32/csrsrv/procsup.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrsr... ============================================================================== --- branches/ros-csrss/subsystems/win32/csrsrv/procsup.c [iso-8859-1] (original) +++ branches/ros-csrss/subsystems/win32/csrsrv/procsup.c [iso-8859-1] Tue Nov 20 19:34:03 2012 @@ -32,9 +32,9 @@ /* PRIVATE FUNCTIONS **********************************************************/
/*++ - * @name CsrpSetToNormalPriority - * - * The CsrpSetToNormalPriority routine sets the current NT Process' + * @name CsrSetToNormalPriority + * + * The CsrSetToNormalPriority routine sets the current NT Process' * priority to the normal priority for CSR Processes. * * @param None. @@ -47,7 +47,7 @@ *--*/ VOID NTAPI -CsrSetToNormalPriority(VOID) // CsrpSetToNormalPriority +CsrSetToNormalPriority(VOID) { KPRIORITY BasePriority = (8 + 1) + 4;
@@ -59,9 +59,9 @@ }
/*++ - * @name CsrpSetToShutdownPriority - * - * The CsrpSetToShutdownPriority routine sets the current NT Process' + * @name CsrSetToShutdownPriority + * + * 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 @@ *--*/ VOID NTAPI -CsrSetToShutdownPriority(VOID) // CsrpSetToShutdownPriority +CsrSetToShutdownPriority(VOID) { KPRIORITY SetBasePriority = (8 + 1) + 6; BOOLEAN Old; @@ -1288,7 +1288,6 @@ }
/* Set shudown Priority */ - // CsrpSetToShutdownPriority(); CsrSetToShutdownPriority();
/* Start looping */ @@ -1365,7 +1364,6 @@
Quickie: /* Return to normal priority */ - // CsrpSetToNormalPriority(); CsrSetToNormalPriority();
return Status;
Modified: branches/ros-csrss/subsystems/win32/csrsrv/wait.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrsr... ============================================================================== --- branches/ros-csrss/subsystems/win32/csrsrv/wait.c [iso-8859-1] (original) +++ branches/ros-csrss/subsystems/win32/csrsrv/wait.c [iso-8859-1] Tue Nov 20 19:34:03 2012 @@ -163,7 +163,7 @@ RemoveEntryList(&WaitBlock->UserWaitList); }
- /* Dereference teh thread */ + /* Dereference the thread */ CsrDereferenceThread(WaitBlock->WaitThread);
/* Free the wait block */