-/*\r
- * COPYRIGHT: See COPYING in the top level directory\r
- * PROJECT: ReactOS NT Library\r
- * FILE: dll/ntdll/dispatch/dispatch.c\r
- * PURPOSE: User-Mode NT Dispatchers\r
- * PROGRAMERS: Alex Ionescu (alex@relsoft.net)\r
- * David Welch <welch@cwcom.net>\r
- */\r
-\r
-/* INCLUDES *****************************************************************/\r
-\r
-#include <ntdll.h>\r
-#define NDEBUG\r
-#include <debug.h>\r
-\r
-typedef NTSTATUS (NTAPI *USER_CALL)(PVOID Argument, ULONG ArgumentLength);\r
-\r
-/* FUNCTIONS ****************************************************************/\r
-\r
-/*\r
- * @implemented\r
- */\r
-VOID\r
-NTAPI\r
-KiUserExceptionDispatcher(PEXCEPTION_RECORD ExceptionRecord,\r
- PCONTEXT Context)\r
-{\r
- EXCEPTION_RECORD NestedExceptionRecord;\r
- NTSTATUS Status;\r
-\r
- /* Dispatch the exception and check the result */\r
- if (RtlDispatchException(ExceptionRecord, Context))\r
- {\r
- /* Continue executing */\r
- Status = NtContinue(Context, FALSE);\r
- }\r
- else\r
- {\r
- /* Raise an exception */\r
- Status = NtRaiseException(ExceptionRecord, Context, FALSE);\r
- }\r
-\r
- /* Setup the Exception record */\r
- NestedExceptionRecord.ExceptionCode = Status;\r
- NestedExceptionRecord.ExceptionFlags = EXCEPTION_NONCONTINUABLE;\r
- NestedExceptionRecord.ExceptionRecord = ExceptionRecord;\r
- NestedExceptionRecord.NumberParameters = Status;\r
-\r
- /* Raise the exception */\r
- RtlRaiseException(&NestedExceptionRecord);\r
-}\r
-\r
-/*\r
- * @implemented\r
- */\r
-VOID\r
-NTAPI\r
-KiRaiseUserExceptionDispatcher(VOID)\r
-{\r
- EXCEPTION_RECORD ExceptionRecord;\r
-\r
- /* Setup the exception record */\r
- ExceptionRecord.ExceptionCode = ((PTEB)NtCurrentTeb())->ExceptionCode;\r
- ExceptionRecord.ExceptionFlags = 0;\r
- ExceptionRecord.ExceptionRecord = NULL;\r
- ExceptionRecord.NumberParameters = 0;\r
-\r
- /* Raise the exception */\r
- RtlRaiseException(&ExceptionRecord);\r
-}\r
-\r
-/*\r
- * @implemented\r
- */\r
-VOID\r
-NTAPI\r
-KiUserCallbackDispatcher(ULONG Index,\r
- PVOID Argument,\r
- ULONG ArgumentLength)\r
-{\r
- /* Return with the result of the callback function */\r
- ZwCallbackReturn(NULL,\r
- 0,\r
- ((USER_CALL)(NtCurrentPeb()->KernelCallbackTable[Index]))\r
- (Argument, ArgumentLength));\r
-}\r
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS NT Library
+ * FILE: dll/ntdll/dispatch/dispatch.c
+ * PURPOSE: User-Mode NT Dispatchers
+ * PROGRAMERS: Alex Ionescu (alex@relsoft.net)
+ * David Welch <welch@cwcom.net>
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntdll.h>
+#define NDEBUG
+#include <debug.h>
+
+typedef NTSTATUS (NTAPI *USER_CALL)(PVOID Argument, ULONG ArgumentLength);
+
+/* FUNCTIONS ****************************************************************/
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+KiUserExceptionDispatcher(PEXCEPTION_RECORD ExceptionRecord,
+ PCONTEXT Context)
+{
+ EXCEPTION_RECORD NestedExceptionRecord;
+ NTSTATUS Status;
+
+ /* Dispatch the exception and check the result */
+ if (RtlDispatchException(ExceptionRecord, Context))
+ {
+ /* Continue executing */
+ Status = NtContinue(Context, FALSE);
+ }
+ else
+ {
+ /* Raise an exception */
+ Status = NtRaiseException(ExceptionRecord, Context, FALSE);
+ }
+
+ /* Setup the Exception record */
+ NestedExceptionRecord.ExceptionCode = Status;
+ NestedExceptionRecord.ExceptionFlags = EXCEPTION_NONCONTINUABLE;
+ NestedExceptionRecord.ExceptionRecord = ExceptionRecord;
+ NestedExceptionRecord.NumberParameters = Status;
+
+ /* Raise the exception */
+ RtlRaiseException(&NestedExceptionRecord);
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+KiRaiseUserExceptionDispatcher(VOID)
+{
+ EXCEPTION_RECORD ExceptionRecord;
+
+ /* Setup the exception record */
+ ExceptionRecord.ExceptionCode = ((PTEB)NtCurrentTeb())->ExceptionCode;
+ ExceptionRecord.ExceptionFlags = 0;
+ ExceptionRecord.ExceptionRecord = NULL;
+ ExceptionRecord.NumberParameters = 0;
+
+ /* Raise the exception */
+ RtlRaiseException(&ExceptionRecord);
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+KiUserCallbackDispatcher(ULONG Index,
+ PVOID Argument,
+ ULONG ArgumentLength)
+{
+ /* Return with the result of the callback function */
+ ZwCallbackReturn(NULL,
+ 0,
+ ((USER_CALL)(NtCurrentPeb()->KernelCallbackTable[Index]))
+ (Argument, ArgumentLength));
+}