[ros-diffs] [fireball] 34521: Yuriy Sidorov <jura at cp-lab.com> - Speed-up user mode exception handling by calling RtlDispatchException() first if there is no active user mode debugger. This avoids switches to kernel mode if exception can be handled by SEH. See issue #3485 for more details.

fireball at svn.reactos.org fireball at svn.reactos.org
Tue Jul 15 15:32:19 CEST 2008


Author: fireball
Date: Tue Jul 15 08:32:18 2008
New Revision: 34521

URL: http://svn.reactos.org/svn/reactos?rev=34521&view=rev
Log:
Yuriy Sidorov <jura at cp-lab.com>
- Speed-up user mode exception handling by calling RtlDispatchException() first if there is no active user mode debugger. This avoids switches to kernel mode if exception can be handled by SEH.
See issue #3485 for more details.

Modified:
    trunk/reactos/lib/rtl/exception.c

Modified: trunk/reactos/lib/rtl/exception.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/exception.c?rev=34521&r1=34520&r2=34521&view=diff
==============================================================================
--- trunk/reactos/lib/rtl/exception.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/exception.c [iso-8859-1] Tue Jul 15 08:32:18 2008
@@ -41,8 +41,8 @@
     /* Write the context flag */
     Context.ContextFlags = CONTEXT_FULL;
 
-    /* Check mode */
-    if (RtlpGetMode() == UserMode)
+    /* Check if user mode debugger is active */
+    if (RtlpCheckForActiveDebugger(FALSE))
     {
         /* Raise an exception immediately */
         Status = ZwRaiseException(ExceptionRecord, &Context, TRUE);
@@ -94,8 +94,8 @@
     /* Write the context flag */
     Context.ContextFlags = CONTEXT_FULL;
 
-    /* Check mode */
-    if (RtlpGetMode() == UserMode)
+    /* Check if user mode debugger is active */
+    if (RtlpCheckForActiveDebugger(FALSE))
     {
         /* Raise an exception immediately */
         ZwRaiseException(&ExceptionRecord, &Context, TRUE);



More information about the Ros-diffs mailing list