mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:33:16 +00:00
[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
This commit is contained in:
parent
90229a39a0
commit
ae88c763da
5 changed files with 9 additions and 110 deletions
|
@ -24,24 +24,6 @@ extern ULONG CsrMaxApiRequestThreads;
|
||||||
|
|
||||||
/* FUNCTIONS ******************************************************************/
|
/* 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
|
* @name CsrCallServerFromServer
|
||||||
* @implemented NT4
|
* @implemented NT4
|
||||||
|
@ -626,7 +608,7 @@ CsrApiRequestThread(IN PVOID Parameter)
|
||||||
if ((ServerDll) && (ServerDll->HardErrorCallback))
|
if ((ServerDll) && (ServerDll->HardErrorCallback))
|
||||||
{
|
{
|
||||||
/* Call it */
|
/* Call it */
|
||||||
ServerDll->HardErrorCallback(NULL /* CsrThread */, HardErrorMsg);
|
ServerDll->HardErrorCallback(NULL /* CsrThread == NULL */, HardErrorMsg);
|
||||||
|
|
||||||
/* If it's handled, get out of here */
|
/* If it's handled, get out of here */
|
||||||
if (HardErrorMsg->Response != ResponseNotHandled) break;
|
if (HardErrorMsg->Response != ResponseNotHandled) break;
|
||||||
|
@ -1141,7 +1123,7 @@ CsrConnectToUser(VOID)
|
||||||
&hUser32);
|
&hUser32);
|
||||||
RtlFreeUnicodeString(&TempName);
|
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))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
RtlInitAnsiString(&StartupName,"ClientThreadSetup");
|
RtlInitAnsiString(&StartupName,"ClientThreadSetup");
|
||||||
|
|
|
@ -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 <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 */
|
|
|
@ -38,29 +38,6 @@ SYSTEM_BASIC_INFORMATION CsrNtSysInfo;
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS **********************************************************/
|
/* 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 === */
|
/* === INIT ROUTINES === */
|
||||||
|
|
||||||
/*++
|
/*++
|
||||||
|
|
|
@ -32,9 +32,9 @@ extern ULONG CsrTotalPerProcessDataLength;
|
||||||
/* PRIVATE FUNCTIONS **********************************************************/
|
/* 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.
|
* priority to the normal priority for CSR Processes.
|
||||||
*
|
*
|
||||||
* @param None.
|
* @param None.
|
||||||
|
@ -47,7 +47,7 @@ extern ULONG CsrTotalPerProcessDataLength;
|
||||||
*--*/
|
*--*/
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
CsrSetToNormalPriority(VOID) // CsrpSetToNormalPriority
|
CsrSetToNormalPriority(VOID)
|
||||||
{
|
{
|
||||||
KPRIORITY BasePriority = (8 + 1) + 4;
|
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.
|
* priority to the boosted priority for CSR Processes doing shutdown.
|
||||||
* Additonally, it acquires the Shutdown Privilege required for shutdown.
|
* Additonally, it acquires the Shutdown Privilege required for shutdown.
|
||||||
*
|
*
|
||||||
|
@ -75,7 +75,7 @@ CsrSetToNormalPriority(VOID) // CsrpSetToNormalPriority
|
||||||
*--*/
|
*--*/
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
CsrSetToShutdownPriority(VOID) // CsrpSetToShutdownPriority
|
CsrSetToShutdownPriority(VOID)
|
||||||
{
|
{
|
||||||
KPRIORITY SetBasePriority = (8 + 1) + 6;
|
KPRIORITY SetBasePriority = (8 + 1) + 6;
|
||||||
BOOLEAN Old;
|
BOOLEAN Old;
|
||||||
|
@ -1288,7 +1288,6 @@ CsrShutdownProcesses(IN PLUID CallerLuid,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set shudown Priority */
|
/* Set shudown Priority */
|
||||||
// CsrpSetToShutdownPriority();
|
|
||||||
CsrSetToShutdownPriority();
|
CsrSetToShutdownPriority();
|
||||||
|
|
||||||
/* Start looping */
|
/* Start looping */
|
||||||
|
@ -1365,7 +1364,6 @@ CsrShutdownProcesses(IN PLUID CallerLuid,
|
||||||
|
|
||||||
Quickie:
|
Quickie:
|
||||||
/* Return to normal priority */
|
/* Return to normal priority */
|
||||||
// CsrpSetToNormalPriority();
|
|
||||||
CsrSetToNormalPriority();
|
CsrSetToNormalPriority();
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
|
@ -163,7 +163,7 @@ CsrNotifyWaitBlock(IN PCSR_WAIT_BLOCK WaitBlock,
|
||||||
RemoveEntryList(&WaitBlock->UserWaitList);
|
RemoveEntryList(&WaitBlock->UserWaitList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dereference teh thread */
|
/* Dereference the thread */
|
||||||
CsrDereferenceThread(WaitBlock->WaitThread);
|
CsrDereferenceThread(WaitBlock->WaitThread);
|
||||||
|
|
||||||
/* Free the wait block */
|
/* Free the wait block */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue