- NDK fix: don't undef a million status codes, instead, have apps define WIN32_NO_STATUS.
[reactos.git] / reactos / lib / rtl / rtlp.h
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 #ifdef DBG
13 extern 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 /* These provide support for sharing code between User and Kernel RTL */
20 PVOID
21 NTAPI
22 RtlpAllocateMemory(
23 ULONG Bytes,
24 ULONG Tag);
25
26 VOID
27 NTAPI
28 RtlpFreeMemory(
29 PVOID Mem,
30 ULONG Tag);
31
32 KPROCESSOR_MODE
33 NTAPI
34 RtlpGetMode(VOID);
35
36 NTSTATUS
37 NTAPI
38 RtlDeleteHeapLock(PRTL_CRITICAL_SECTION CriticalSection);
39
40 NTSTATUS
41 NTAPI
42 RtlEnterHeapLock(PRTL_CRITICAL_SECTION CriticalSection);
43
44 NTSTATUS
45 NTAPI
46 RtlInitializeHeapLock(PRTL_CRITICAL_SECTION CriticalSection);
47
48 NTSTATUS
49 NTAPI
50 RtlLeaveHeapLock(PRTL_CRITICAL_SECTION CriticalSection);
51
52 BOOLEAN
53 NTAPI
54 RtlpCheckForActiveDebugger(BOOLEAN Type);
55
56 BOOLEAN
57 NTAPI
58 RtlpHandleDpcStackException(IN PEXCEPTION_REGISTRATION_RECORD RegistrationFrame,
59 IN ULONG_PTR RegistrationFrameEnd,
60 IN OUT PULONG_PTR StackLow,
61 IN OUT PULONG_PTR StackHigh);
62
63 #define RtlpAllocateStringMemory RtlpAllocateMemory
64 #define RtlpFreeStringMemory RtlpFreeMemory
65
66 BOOLEAN
67 NTAPI
68 RtlpSetInDbgPrint(IN BOOLEAN NewValue);
69
70 /* i386/except.S */
71
72 EXCEPTION_DISPOSITION
73 NTAPI
74 RtlpExecuteHandlerForException(PEXCEPTION_RECORD ExceptionRecord,
75 PEXCEPTION_REGISTRATION_RECORD RegistrationFrame,
76 PCONTEXT Context,
77 PVOID DispatcherContext,
78 PEXCEPTION_HANDLER ExceptionHandler);
79
80 EXCEPTION_DISPOSITION
81 NTAPI
82 RtlpExecuteHandlerForUnwind(PEXCEPTION_RECORD ExceptionRecord,
83 PEXCEPTION_REGISTRATION_RECORD RegistrationFrame,
84 PCONTEXT Context,
85 PVOID DispatcherContext,
86 PEXCEPTION_HANDLER ExceptionHandler);
87
88 VOID
89 NTAPI
90 RtlpCheckLogException(IN PEXCEPTION_RECORD ExceptionRecord,
91 IN PCONTEXT ContextRecord,
92 IN PVOID ContextData,
93 IN ULONG Size);
94
95 PVOID
96 NTAPI
97 RtlpGetExceptionAddress(VOID);
98
99 VOID
100 NTAPI
101 RtlpCaptureContext(OUT PCONTEXT ContextRecord);
102
103 /* i386/debug.S */
104 NTSTATUS
105 NTAPI
106 DebugService(IN ULONG Service,
107 IN PVOID Buffer,
108 IN ULONG Length,
109 IN PVOID Argument1,
110 IN PVOID Argument2);
111
112 /* Tags for the String Allocators */
113 #define TAG_USTR TAG('U', 'S', 'T', 'R')
114 #define TAG_ASTR TAG('A', 'S', 'T', 'R')
115 #define TAG_OSTR TAG('O', 'S', 'T', 'R')
116
117 /* EOF */