Author: tkreuzer
Date: Tue Jan 27 06:58:24 2009
New Revision: 39133
URL: http://svn.reactos.org/svn/reactos?rev=39133&view=rev
Log:
kdcom: xor 1 to CurrentPacketId when we receive an ACK, not when we send one. Remove the SYNC_PACKET_ID hack. Now breaking in after DbgPrints works.
Modified:
branches/ros-amd64-bringup/reactos/drivers/base/kdcom/i386/kdbg.c
Modified: branches/ros-amd64-bringup/reactos/drivers/base/kdcom/i386/kdbg.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/base/kdcom/i386/kdbg.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/base/kdcom/i386/kdbg.c [iso-8859-1] Tue Jan 27 06:58:24 2009
@@ -814,12 +814,6 @@
MessageData->Length);
}
- // FIXME: this looks wrong, but makes dbgprints work
- if (PacketType == PACKET_TYPE_KD_DEBUG_IO)
- {
- CurrentPacketId |= SYNC_PACKET_ID;
- }
-
/* Set the packet id */
Packet.PacketId = CurrentPacketId;
@@ -967,6 +961,7 @@
if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE)
{
/* Remote acknowledges the last packet */
+ CurrentPacketId ^= 1;
return KdPacketReceived;
}
/* That's not what we were waiting for, start over. */
@@ -1091,7 +1086,6 @@
/* Acknowledge the received packet */
KdpSendControlPacket(PACKET_TYPE_KD_ACKNOWLEDGE, Packet.PacketId);
- CurrentPacketId ^= 1;
//FrLdrDbgPrint("KdReceivePacket - all ok\n");
Author: arty
Date: Tue Jan 27 03:35:01 2009
New Revision: 39130
URL: http://svn.reactos.org/svn/reactos?rev=39130&view=rev
Log:
This code used to round down the number of waiters to a multiple of 2. Fine
if there are exactly one or zero waiters, not fine if there are 2 or more.
Modified:
trunk/reactos/ntoskrnl/ke/gmutex.c
Modified: trunk/reactos/ntoskrnl/ke/gmutex.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/gmutex.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/gmutex.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/gmutex.c [iso-8859-1] Tue Jan 27 03:35:01 2009
@@ -123,7 +123,7 @@
/* The mutex will be woken, minus one waiter */
NewValue = (OldValue | GM_LOCK_WAITER_WOKEN);
- NewValue &= ~GM_LOCK_WAITER_INC;
+ NewValue -= GM_LOCK_WAITER_INC;
/* Remove the Woken bit */
if (InterlockedCompareExchange(&GuardedMutex->Count,