adding winetest from the vendor drop for usp10.dll
[reactos.git] / reactos / ntoskrnl / lpc / ntlpc / lpc.h
1 /*
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)
7 */
8
9 //
10 // Define this if you want debugging support
11 //
12 #define _LPC_DEBUG_ 0x01
13
14 //
15 // These define the Debug Masks Supported
16 //
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
24
25 //
26 // Debug/Tracing support
27 //
28 #if _LPC_DEBUG_
29 #ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented
30 #define LPCTRACE(x, ...) \
31 { \
32 DbgPrintEx("%s [%.16s] - ", \
33 __FUNCTION__, \
34 PsGetCurrentProcess()->ImageFileName); \
35 DbgPrintEx(__VA_ARGS__); \
36 }
37 #else
38 #define LPCTRACE(x, ...) \
39 if (x & LpcpTraceLevel) \
40 { \
41 DbgPrint("%s [%.16s:%lx] - ", \
42 __FUNCTION__, \
43 PsGetCurrentProcess()->ImageFileName, \
44 PsGetCurrentThreadId()); \
45 DbgPrint(__VA_ARGS__); \
46 }
47 #endif
48 #endif
49
50 //
51 // Internal Port Management
52 //
53 VOID
54 NTAPI
55 LpcpClosePort(
56 IN PEPROCESS Process OPTIONAL,
57 IN PVOID Object,
58 IN ACCESS_MASK GrantedAccess,
59 IN ULONG ProcessHandleCount,
60 IN ULONG SystemHandleCount
61 );
62
63 VOID
64 NTAPI
65 LpcpDeletePort(
66 IN PVOID ObjectBody
67 );
68
69 NTSTATUS
70 NTAPI
71 LpcpInitializePortQueue(
72 IN PLPCP_PORT_OBJECT Port
73 );
74
75 VOID
76 NTAPI
77 LpcpFreeToPortZone(
78 IN PLPCP_MESSAGE Message,
79 IN ULONG Flags
80 );
81
82 VOID
83 NTAPI
84 LpcpMoveMessage(
85 IN PPORT_MESSAGE Destination,
86 IN PPORT_MESSAGE Origin,
87 IN PVOID Data,
88 IN ULONG MessageType,
89 IN PCLIENT_ID ClientId
90 );
91
92 VOID
93 NTAPI
94 LpcpSaveDataInfoMessage(
95 IN PLPCP_PORT_OBJECT Port,
96 IN PLPCP_MESSAGE Message
97 );
98
99 //
100 // Module-external utlity functions
101 //
102 VOID
103 NTAPI
104 LpcExitThread(
105 IN PETHREAD Thread
106 );
107
108 //
109 // Initialization functions
110 //
111 NTSTATUS
112 NTAPI
113 LpcpInitSystem(
114 VOID
115 );
116
117 //
118 // Global data inside the Process Manager
119 //
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;
126
127 //
128 // Inlined Functions
129 //
130 #include "lpc_x.h"