2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/include/lpc.h
5 * PURPOSE: Internal header for the Local Procedure Call
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
10 // Define this if you want debugging support
12 #define _LPC_DEBUG_ 0x01
15 // These define the Debug Masks Supported
17 #define LPC_CREATE_DEBUG 0x01
18 #define LPC_CLOSE_DEBUG 0x02
19 #define LPC_CONNECT_DEBUG 0x04
20 #define LPC_LISTEN_DEBUG 0x08
21 #define LPC_REPLY_DEBUG 0x10
22 #define LPC_COMPLETE_DEBUG 0x20
23 #define LPC_SEND_DEBUG 0x40
26 // Debug/Tracing support
29 #ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented
30 #define LPCTRACE(x, ...) \
32 DbgPrintEx("%s [%.16s] - ", \
34 PsGetCurrentProcess()->ImageFileName); \
35 DbgPrintEx(__VA_ARGS__); \
38 #define LPCTRACE(x, ...) \
39 if (x & LpcpTraceLevel) \
41 DbgPrint("%s [%.16s:%lx] - ", \
43 PsGetCurrentProcess()->ImageFileName, \
44 PsGetCurrentThreadId()); \
45 DbgPrint(__VA_ARGS__); \
51 // Internal Port Management
56 IN PEPROCESS Process OPTIONAL
,
58 IN ACCESS_MASK GrantedAccess
,
59 IN ULONG ProcessHandleCount
,
60 IN ULONG SystemHandleCount
71 LpcpInitializePortQueue(
72 IN PLPCP_PORT_OBJECT Port
78 IN PLPCP_MESSAGE Message
,
85 IN PPORT_MESSAGE Destination
,
86 IN PPORT_MESSAGE Origin
,
89 IN PCLIENT_ID ClientId
94 LpcpSaveDataInfoMessage(
95 IN PLPCP_PORT_OBJECT Port
,
96 IN PLPCP_MESSAGE Message
100 // Module-external utlity functions
109 // Initialization functions
118 // Global data inside the Process Manager
120 extern POBJECT_TYPE LpcPortObjectType
;
121 extern ULONG LpcpNextMessageId
, LpcpNextCallbackId
;
122 extern KGUARDED_MUTEX LpcpLock
;
123 extern PAGED_LOOKASIDE_LIST LpcpMessagesLookaside
;
124 extern ULONG LpcpMaxMessageSize
;
125 extern ULONG LpcpTraceLevel
;