mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Normalize private symbols in LPC, plus minor changes/adds.
svn path=/trunk/; revision=11512
This commit is contained in:
parent
430b802b99
commit
5f451aa443
5 changed files with 34 additions and 24 deletions
|
@ -12,6 +12,8 @@
|
|||
#define NTOS_MODE_KERNEL
|
||||
#include <ntos.h>
|
||||
|
||||
#define TAG_OBJECT_TYPE TAG('O', 'b', 'j', 'T')
|
||||
|
||||
struct _EPROCESS;
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -26,11 +26,7 @@ typedef struct _EPORT
|
|||
|
||||
ULONG MaxDataLength;
|
||||
ULONG MaxConnectInfoLength;
|
||||
|
||||
/*
|
||||
* List of processes that can receive connection requests on this port.
|
||||
*/
|
||||
LIST_ENTRY ListenerListHead;
|
||||
ULONG MaxPoolUsage; /* size of NP zone */
|
||||
} EPORT, * PEPORT;
|
||||
|
||||
|
||||
|
@ -88,6 +84,12 @@ LpcSendTerminationPort (PEPORT Port,
|
|||
#define EPORT_CONNECTED_SERVER (6)
|
||||
#define EPORT_DISCONNECTED (7)
|
||||
|
||||
/* Pool Tags */
|
||||
|
||||
#define TAG_LPC_MESSAGE TAG('L', 'p', 'c', 'M')
|
||||
#define TAG_LPC_ZONE TAG('L', 'p', 'c', 'Z')
|
||||
|
||||
|
||||
typedef struct _QUEUEDMESSAGE
|
||||
{
|
||||
PEPORT Sender;
|
||||
|
@ -139,7 +141,8 @@ NTSTATUS
|
|||
NiInitPort (VOID);
|
||||
|
||||
extern POBJECT_TYPE ExPortType;
|
||||
extern ULONG EiNextLpcMessageId;
|
||||
extern ULONG LpcpNextMessageId;
|
||||
extern FAST_MUTEX LpcpLock;
|
||||
|
||||
/* Code in ntoskrnl/lpc/reply.c */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: create.c,v 1.17 2004/08/15 16:39:06 chorns Exp $
|
||||
/* $Id: create.c,v 1.18 2004/10/31 20:27:08 ea Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -32,7 +32,7 @@ LpcpVerifyCreateParameters (IN PHANDLE PortHandle,
|
|||
IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||
IN ULONG MaxConnectInfoLength,
|
||||
IN ULONG MaxDataLength,
|
||||
IN ULONG Reserved)
|
||||
IN ULONG MaxPoolUsage)
|
||||
{
|
||||
if (NULL == PortHandle)
|
||||
{
|
||||
|
@ -58,8 +58,8 @@ LpcpVerifyCreateParameters (IN PHANDLE PortHandle,
|
|||
{
|
||||
return (STATUS_INVALID_PARAMETER_4);
|
||||
}
|
||||
/* FIXME: some checking is done also on Reserved, but
|
||||
* not in public (free/checked) versions. */
|
||||
/* TODO: some checking is done also on MaxPoolUsage
|
||||
* to avoid choking the executive */
|
||||
return (STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ NiCreatePort (PVOID ObjectBody,
|
|||
* ObjectAttributes,
|
||||
* MaxConnectInfoLength,
|
||||
* MaxDataLength,
|
||||
* Reserved
|
||||
* MaxPoolUsage: size of NP zone the NP part of msgs is kept in
|
||||
*
|
||||
* RETURN VALUE
|
||||
*/
|
||||
|
@ -114,7 +114,7 @@ NtCreatePort (PHANDLE PortHandle,
|
|||
POBJECT_ATTRIBUTES ObjectAttributes,
|
||||
ULONG MaxConnectInfoLength,
|
||||
ULONG MaxDataLength,
|
||||
ULONG Reserved)
|
||||
ULONG MaxPoolUsage)
|
||||
{
|
||||
PEPORT Port;
|
||||
NTSTATUS Status;
|
||||
|
@ -126,7 +126,7 @@ NtCreatePort (PHANDLE PortHandle,
|
|||
ObjectAttributes,
|
||||
MaxConnectInfoLength,
|
||||
MaxDataLength,
|
||||
Reserved);
|
||||
MaxPoolUsage);
|
||||
if (STATUS_SUCCESS != Status)
|
||||
{
|
||||
return (Status);
|
||||
|
@ -162,6 +162,7 @@ NtCreatePort (PHANDLE PortHandle,
|
|||
Status = NiInitializePort (Port, EPORT_TYPE_SERVER_RQST_PORT, NULL);
|
||||
Port->MaxConnectInfoLength = PORT_MAX_DATA_LENGTH;
|
||||
Port->MaxDataLength = PORT_MAX_MESSAGE_LENGTH;
|
||||
Port->MaxPoolUsage = MaxPoolUsage;
|
||||
|
||||
ObDereferenceObject (Port);
|
||||
|
||||
|
@ -183,7 +184,7 @@ NtCreatePort (PHANDLE PortHandle,
|
|||
* ObjectAttributes,
|
||||
* MaxConnectInfoLength,
|
||||
* MaxDataLength,
|
||||
* Reserved
|
||||
* MaxPoolUsage
|
||||
*
|
||||
* RETURN VALUE
|
||||
*/
|
||||
|
@ -192,7 +193,7 @@ NtCreateWaitablePort (OUT PHANDLE PortHandle,
|
|||
IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||
IN ULONG MaxConnectInfoLength,
|
||||
IN ULONG MaxDataLength,
|
||||
IN ULONG Reserved)
|
||||
IN ULONG MaxPoolUsage)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
|
@ -201,7 +202,7 @@ NtCreateWaitablePort (OUT PHANDLE PortHandle,
|
|||
ObjectAttributes,
|
||||
MaxConnectInfoLength,
|
||||
MaxDataLength,
|
||||
Reserved);
|
||||
MaxPoolUsage);
|
||||
if (STATUS_SUCCESS != Status)
|
||||
{
|
||||
return (Status);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: port.c,v 1.19 2004/08/15 16:39:06 chorns Exp $
|
||||
/* $Id: port.c,v 1.20 2004/10/31 20:27:08 ea Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -22,7 +22,8 @@
|
|||
/* GLOBALS *******************************************************************/
|
||||
|
||||
POBJECT_TYPE ExPortType = NULL;
|
||||
ULONG EiNextLpcMessageId = 0;
|
||||
ULONG LpcpNextMessageId = 0; /* 0 is not a valid ID */
|
||||
FAST_MUTEX LpcpLock; /* global internal sync in LPC facility */
|
||||
|
||||
static GENERIC_MAPPING ExpPortMapping = {
|
||||
STANDARD_RIGHTS_READ,
|
||||
|
@ -36,7 +37,7 @@ static GENERIC_MAPPING ExpPortMapping = {
|
|||
NTSTATUS INIT_FUNCTION
|
||||
NiInitPort (VOID)
|
||||
{
|
||||
ExPortType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
|
||||
ExPortType = ExAllocatePoolWithTag(NonPagedPool,sizeof(OBJECT_TYPE),TAG_OBJECT_TYPE);
|
||||
|
||||
RtlRosInitUnicodeStringFromLiteral(&ExPortType->TypeName,L"Port");
|
||||
|
||||
|
@ -61,7 +62,9 @@ NiInitPort (VOID)
|
|||
|
||||
ObpCreateTypeObject(ExPortType);
|
||||
|
||||
EiNextLpcMessageId = 0;
|
||||
LpcpNextMessageId = 0;
|
||||
|
||||
ExInitializeFastMutex (& LpcpLock);
|
||||
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
@ -77,6 +80,9 @@ NiInitPort (VOID)
|
|||
*
|
||||
* ARGUMENTS
|
||||
* Port Pointer to an EPORT object to initialize.
|
||||
* Type connect (RQST), or communication port (COMM)
|
||||
* Parent OPTIONAL connect port a communication port
|
||||
* is created from
|
||||
*
|
||||
* RETURN VALUE
|
||||
* STATUS_SUCCESS if initialization succedeed. An error code
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: reply.c,v 1.22 2004/09/13 19:10:45 gvg Exp $
|
||||
/* $Id: reply.c,v 1.23 2004/10/31 20:27:08 ea Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -17,8 +17,6 @@
|
|||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
#define TAG_LPC_MESSAGE TAG('L', 'P', 'C', 'M')
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
/**********************************************************************
|
||||
|
@ -58,7 +56,7 @@ EiReplyOrRequestPort (IN PEPORT Port,
|
|||
MessageReply->Message.ClientId.UniqueProcess = PsGetCurrentProcessId();
|
||||
MessageReply->Message.ClientId.UniqueThread = PsGetCurrentThreadId();
|
||||
MessageReply->Message.MessageType = MessageType;
|
||||
MessageReply->Message.MessageId = InterlockedIncrement((LONG *)&EiNextLpcMessageId);
|
||||
MessageReply->Message.MessageId = InterlockedIncrement((LONG *)&LpcpNextMessageId);
|
||||
|
||||
KeAcquireSpinLock(&Port->Lock, &oldIrql);
|
||||
EiEnqueueMessagePort(Port, MessageReply);
|
||||
|
|
Loading…
Reference in a new issue