ReactOS 0.4.15-dev-5666-gc548b97
rtlp.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS System Libraries
4 * FILE: lib/rtl/rtlp.h
5 * PURPOSE: Run-Time Libary Internal Header
6 * PROGRAMMER: Alex Ionescu
7 */
8
9/* INCLUDES ******************************************************************/
10
11/* PAGED_CODE equivalent for user-mode RTL */
12#if DBG
13extern VOID FASTCALL CHECK_PAGED_CODE_RTL(char *file, int line);
14#define PAGED_CODE_RTL() CHECK_PAGED_CODE_RTL(__FILE__, __LINE__)
15#else
16#define PAGED_CODE_RTL()
17#endif
18
19#ifdef _PPC_
20#define SWAPD(x) ((((x)&0xff)<<24)|(((x)&0xff00)<<8)|(((x)>>8)&0xff00)|(((x)>>24)&0xff))
21#define SWAPW(x) ((((x)&0xff)<<8)|(((x)>>8)&0xff))
22#define SWAPQ(x) ((SWAPD((x)&0xffffffff) << 32) | (SWAPD((x)>>32)))
23#else
24#define SWAPD(x) (x)
25#define SWAPW(x) (x)
26#define SWAPQ(x) (x)
27#endif
28
29#define ROUND_DOWN(n, align) \
30 (((ULONG_PTR)(n)) & ~((align) - 1l))
31
32#define ROUND_UP(n, align) \
33 ROUND_DOWN(((ULONG_PTR)(n)) + (align) - 1, (align))
34
35#define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m)))
36
38
45
46#ifndef _BLDR_
47
48VOID
52
53#ifdef _M_IX86
54
57RtlpGetExceptionList(VOID);
58
59VOID
61RtlpSetExceptionList(PEXCEPTION_REGISTRATION_RECORD NewExceptionList);
62
63#endif /* _M_IX86 */
64
65/* For heap.c */
66VOID
69
70/* For vectoreh.c */
74 IN PEXCEPTION_RECORD ExceptionRecord,
76);
77
78VOID
81 IN PEXCEPTION_RECORD ExceptionRecord,
83);
84
85#ifdef _M_IX86
86typedef struct _DISPATCHER_CONTEXT
87{
88 PEXCEPTION_REGISTRATION_RECORD RegistrationPointer;
90#endif
91
92#endif /* !_BLDR_ */
93
94/* These provide support for sharing code between User and Kernel RTL */
99 ULONG Tag);
100
101VOID
102NTAPI
104 PVOID Mem,
105 ULONG Tag);
106
107#ifndef _BLDR_
108
110NTAPI
112
114NTAPI
116 IN ULONG_PTR Ebp,
117 IN ULONG_PTR *StackBegin,
118 IN ULONG_PTR *StackEnd
119);
120
121/* For heap.c and heappage.c */
123NTAPI
125
127NTAPI
129
131NTAPI
133
135NTAPI
137
139NTAPI
141
143NTAPI
145
147NTAPI
149 IN ULONG_PTR RegistrationFrameEnd,
150 IN OUT PULONG_PTR StackLow,
151 IN OUT PULONG_PTR StackHigh);
152
153#endif /* !_BLDR_ */
154
155#define RtlpAllocateStringMemory RtlpAllocateMemory
156#define RtlpFreeStringMemory RtlpFreeMemory
157
158#ifndef _BLDR_
159
160ULONG
161NTAPI
163#define NtGetTickCount RtlGetTickCount
164
166NTAPI
168 VOID
169);
170
171VOID
172NTAPI
174 VOID
175);
176
177/* i386/except.S */
178
179#ifdef _M_IX86
181NTAPI
182RtlpExecuteHandlerForException(PEXCEPTION_RECORD ExceptionRecord,
183 PEXCEPTION_REGISTRATION_RECORD RegistrationFrame,
186 PEXCEPTION_ROUTINE ExceptionHandler);
187#endif
188
190NTAPI
192 PEXCEPTION_REGISTRATION_RECORD RegistrationFrame,
195 PEXCEPTION_ROUTINE ExceptionHandler);
196
197VOID
198NTAPI
201 IN PVOID ContextData,
202 IN ULONG Size);
203
204VOID
205NTAPI
207
208//
209// Debug Service calls
210//
211ULONG
212NTAPI
217 IN PVOID Argument3,
219);
220
221VOID
222NTAPI
227);
228
229/* Timer Queue */
231
234
235#endif /* !_BLDR_ */
236
237/* bitmap64.c */
238typedef struct _RTL_BITMAP64
239{
243
244typedef struct _RTL_BITMAP_RUN64
245{
249
250/* Tags for the String Allocators */
251#define TAG_USTR 'RTSU'
252#define TAG_ASTR 'RTSA'
253#define TAG_OSTR 'RTSO'
254
255/* nls.c */
256WCHAR
257NTAPI
259
260WCHAR
261NTAPI
263
264#ifndef _BLDR_
265
266/* ReactOS only */
267VOID
268NTAPI
269LdrpInitializeProcessCompat(PVOID pProcessActctx, PVOID* pOldShimData);
270
271PVOID
272NTAPI
275
276#endif /* !_BLDR_ */
277
278/* EOF */
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
_In_ PVOID Argument2
Definition: classpnp.h:721
#define UNALIGNED
Definition: crtdefs.h:144
EXCEPTION_ROUTINE * PEXCEPTION_ROUTINE
Definition: compat.h:709
enum _EXCEPTION_DISPOSITION EXCEPTION_DISPOSITION
__in PWDFDEVICE_INIT __in BOOLEAN Exclusive
InternalIoctlParams Argument4
unsigned int ULONG
Definition: retypes.h:1
_In_ UINT Bytes
Definition: mmcopy.h:9
unsigned __int64 * PULONG64
Definition: imports.h:198
unsigned __int64 ULONG64
Definition: imports.h:198
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _Inout_
Definition: ms_sal.h:378
#define _Out_writes_bytes_all_(size)
Definition: ms_sal.h:362
#define _In_
Definition: ms_sal.h:308
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
struct _DISPATCHER_CONTEXT * PDISPATCHER_CONTEXT
struct _DISPATCHER_CONTEXT DISPATCHER_CONTEXT
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2992
#define FASTCALL
Definition: nt_native.h:50
_IRQL_requires_same_ _In_ PVOID _Inout_ struct _CONTEXT * ContextRecord
Definition: ntbasedef.h:654
_IRQL_requires_same_ _In_ PVOID _Inout_ struct _CONTEXT _In_ PVOID DispatcherContext
Definition: ntbasedef.h:655
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
@ Service
Definition: ntsecapi.h:292
#define CONST
Definition: pedump.c:81
BOOLEAN NTAPI RtlpCheckForActiveDebugger(VOID)
Definition: libsupp.c:25
NTSTATUS NTAPI RtlpSafeCopyMemory(_Out_writes_bytes_all_(Length) VOID UNALIGNED *Destination, _In_reads_bytes_(Length) CONST VOID UNALIGNED *Source, _In_ SIZE_T Length)
Definition: rtlcompat.c:56
WCHAR NTAPI RtlpUpcaseUnicodeChar(IN WCHAR Source)
Definition: nls.c:695
NTSTATUS NTAPI RtlInitializeHeapLock(IN OUT PHEAP_LOCK *Lock)
Definition: libsupp.c:126
VOID NTAPI RtlpCheckLogException(IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN PVOID ContextData, IN ULONG Size)
Definition: libsupp.c:201
HANDLE TimerThreadHandle
Definition: timerqueue.c:24
VOID NTAPI RtlpCaptureContext(OUT PCONTEXT ContextRecord)
VOID NTAPI RtlCallVectoredContinueHandlers(IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context)
Definition: vectoreh.c:284
NTSTATUS NTAPI RtlEnterHeapLock(IN OUT PHEAP_LOCK Lock, IN BOOLEAN Exclusive)
Definition: libsupp.c:108
PVOID NTAPI RtlpAllocateMemory(SIZE_T Bytes, ULONG Tag)
Definition: libsupp.c:35
BOOLEAN NTAPI RtlCallVectoredExceptionHandlers(IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context)
Definition: vectoreh.c:273
VOID NTAPI RtlpClearInDbgPrint(VOID)
Definition: libsupp.c:45
struct _RTL_BITMAP_RUN64 * PRTL_BITMAP_RUN64
KPROCESSOR_MODE NTAPI RtlpGetMode(VOID)
Definition: libsupp.c:53
BOOLEAN NTAPI RtlpSetInDbgPrint(VOID)
Definition: libsupp.c:33
BOOLEAN NTAPI RtlpHandleDpcStackException(IN PEXCEPTION_REGISTRATION_RECORD RegistrationFrame, IN ULONG_PTR RegistrationFrameEnd, IN OUT PULONG_PTR StackLow, IN OUT PULONG_PTR StackHigh)
Definition: libsupp.c:190
VOID NTAPI RtlpSetHeapParameters(IN PRTL_HEAP_PARAMETERS Parameters)
Definition: libsupp.c:174
ULONG NTAPI RtlGetTickCount(VOID)
Definition: libsupp.c:1058
BOOLEAN NTAPI RtlTryEnterHeapLock(IN OUT PHEAP_LOCK Lock, IN BOOLEAN Exclusive)
Definition: libsupp.c:117
ULONG NTAPI DebugService(IN ULONG Service, IN PVOID Argument1, IN PVOID Argument2, IN PVOID Argument3, IN PVOID Argument4)
NTSTATUS NTAPI RtlDeleteHeapLock(IN OUT PHEAP_LOCK Lock)
Definition: libsupp.c:101
WCHAR NTAPI RtlpDowncaseUnicodeChar(IN WCHAR Source)
Definition: nls.c:89
struct _RTL_BITMAP64 * PRTL_BITMAP64
EXCEPTION_DISPOSITION NTAPI RtlpExecuteHandlerForUnwind(PEXCEPTION_RECORD ExceptionRecord, PEXCEPTION_REGISTRATION_RECORD RegistrationFrame, PCONTEXT Context, PVOID DispatcherContext, PEXCEPTION_ROUTINE ExceptionHandler)
PVOID NTAPI RtlpDebugBufferCommit(_Inout_ PRTL_DEBUG_INFORMATION Buffer, _In_ SIZE_T Size)
Definition: dbgbuffer.c:20
VOID NTAPI DebugService2(IN PVOID Argument1, IN PVOID Argument2, IN ULONG Service)
struct _RTL_BITMAP64 RTL_BITMAP64
VOID NTAPI LdrpInitializeProcessCompat(PVOID pProcessActctx, PVOID *pOldShimData)
Definition: ldrinit.c:1576
NTSTATUS NTAPI RtlLeaveHeapLock(IN OUT PHEAP_LOCK Lock)
Definition: libsupp.c:133
struct _RTL_BITMAP_RUN64 RTL_BITMAP_RUN64
NTSTATUS RtlpInitializeTimerThread(VOID)
Definition: timerqueue.c:27
VOID NTAPI RtlpGetStackLimits(PULONG_PTR LowLimit, PULONG_PTR HighLimit)
BOOLEAN NTAPI RtlpCaptureStackLimits(IN ULONG_PTR Ebp, IN ULONG_PTR *StackBegin, IN ULONG_PTR *StackEnd)
Definition: libsupp.c:211
VOID NTAPI RtlpFreeMemory(PVOID Mem, ULONG Tag)
Definition: libsupp.c:44
PVOID MmHighestUserAddress
Definition: rtlcompat.c:29
PULONG64 Buffer
Definition: rtlp.h:241
ULONG64 SizeOfBitMap
Definition: rtlp.h:240
ULONG64 StartingIndex
Definition: rtlp.h:246
ULONG64 NumberOfBits
Definition: rtlp.h:247
Definition: fci.c:127
Definition: parser.c:49
uint32_t * PULONG_PTR
Definition: typedefs.h:65
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:696
_Out_ PULONG_PTR HighLimit
Definition: iofuncs.h:2885
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
__wchar_t WCHAR
Definition: xmlstorage.h:180