[ros-diffs] [ion] 25003: - Properly set and check the image notification flag for the process in DbgkCreateThread. Patch by hto. See issue #1879 for more details.

ion at svn.reactos.org ion at svn.reactos.org
Thu Nov 30 20:52:50 CET 2006


Author: ion
Date: Thu Nov 30 22:52:49 2006
New Revision: 25003

URL: http://svn.reactos.org/svn/reactos?rev=25003&view=rev
Log:
- Properly set and check the image notification flag for the process in DbgkCreateThread. Patch by hto.
See issue #1879 for more details.

Modified:
    trunk/reactos/ntoskrnl/dbgk/dbgkutil.c
    trunk/reactos/ntoskrnl/tests/TestDebug.c

Modified: trunk/reactos/ntoskrnl/dbgk/dbgkutil.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/dbgk/dbgkutil.c?rev=25003&r1=25002&r2=25003&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/dbgk/dbgkutil.c (original)
+++ trunk/reactos/ntoskrnl/dbgk/dbgkutil.c Thu Nov 30 22:52:49 2006
@@ -104,10 +104,12 @@
     PTEB Teb;
     PAGED_CODE();
 
-    /* Check if this process has already been notified */
-    ProcessFlags = InterlockedAnd((PLONG)&Process->Flags,
-                                  PSF_CREATE_REPORTED_BIT |
-                                  PSF_IMAGE_NOTIFY_DONE_BIT);
+    /* Try ORing in the create reported and image notify flags */
+    ProcessFlags = InterlockedOr((PLONG)&Process->Flags,
+                                 PSF_CREATE_REPORTED_BIT |
+                                 PSF_IMAGE_NOTIFY_DONE_BIT);
+
+    /* Check if we were the first to set them or if another thread raced us */
     if (!(ProcessFlags & PSF_IMAGE_NOTIFY_DONE_BIT) && (PsImageNotifyEnabled))
     {
         /* It hasn't.. set up the image info for the process */

Modified: trunk/reactos/ntoskrnl/tests/TestDebug.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/tests/TestDebug.c?rev=25003&r1=25002&r2=25003&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/tests/TestDebug.c (original)
+++ trunk/reactos/ntoskrnl/tests/TestDebug.c Thu Nov 30 22:52:49 2006
@@ -49,7 +49,7 @@
                            &ClientId);
     Status = DbgUiDebugActiveProcess(hProcess);
 #else
-    Error = DebugActiveProcess(2648);
+    Error = DebugActiveProcess(168);
 #endif
 
 #if NATIVE




More information about the Ros-diffs mailing list