Author: cgutman
Date: Fri Jan 15 22:00:50 2010
New Revision: 45090
URL: http://svn.reactos.org/svn/reactos?rev=45090&view=rev
Log:
- Fix a bug with our tei_instance selection (we could end up with the same tei_instance value on different entities of the same type if an entity of our type in the middle of the list was deleted previously)
Modified:
branches/aicom-network-branch/drivers/network/tcpip/tcpip/info.c
Modified: branches/aicom-network-branch/drivers/network/tcpip/tcpip/info.c
URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-branch/drivers/ne…
==============================================================================
--- branches/aicom-network-branch/drivers/network/tcpip/tcpip/info.c [iso-8859-1] (original)
+++ branches/aicom-network-branch/drivers/network/tcpip/tcpip/info.c [iso-8859-1] Fri Jan 15 22:00:50 2010
@@ -15,16 +15,27 @@
VOID AddEntity(ULONG EntityType, PVOID Context, ULONG Flags)
{
KIRQL OldIrql;
- ULONG i, Count = 0;
+ ULONG i, Instance = 0;
+ BOOLEAN ChoseIndex = FALSE;
TcpipAcquireSpinLock(&EntityListLock, &OldIrql);
- for (i = 0; i < EntityCount; i++)
- if (EntityList[i].tei_entity == EntityType)
- Count++;
+ while (!ChoseIndex)
+ {
+ ChoseIndex = TRUE;
+ for (i = 0; i < EntityCount; i++)
+ {
+ if (EntityList[i].tei_entity == EntityType &&
+ EntityList[i].tei_instance == Instance)
+ {
+ Instance++;
+ ChoseIndex = FALSE;
+ }
+ }
+ }
EntityList[EntityCount].tei_entity = EntityType;
- EntityList[EntityCount].tei_instance = Count;
+ EntityList[EntityCount].tei_instance = Instance;
EntityList[EntityCount].context = Context;
EntityList[EntityCount].flags = Flags;
EntityCount++;
Author: tkreuzer
Date: Fri Jan 15 21:45:36 2010
New Revision: 45088
URL: http://svn.reactos.org/svn/reactos?rev=45088&view=rev
Log:
[CRT]
Patch by Jose Catena:
allmul produced wrong results when the higher 32 bits of any of the 64 bit operands are not zero. As the comment correctly said the definition of param locations must change
since esp was altered, but the definitions were not actually changed
See issue #5121 for more details.
Modified:
trunk/reactos/lib/sdk/crt/math/i386/allmul_asm.s
Modified: trunk/reactos/lib/sdk/crt/math/i386/allmul_asm.s
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/i386/allm…
==============================================================================
--- trunk/reactos/lib/sdk/crt/math/i386/allmul_asm.s [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/math/i386/allmul_asm.s [iso-8859-1] Fri Jan 15 21:45:36 2010
@@ -93,10 +93,10 @@
// must redefine A and B since esp has been altered
-#define A2LO [esp + 4] // stack address of a
-#define A2HI [esp + 8] // stack address of a
-#define B2LO [esp + 12] // stack address of b
-#define B2HI [esp + 16] // stack address of b
+#define A2LO [esp + 8] // stack address of a
+#define A2HI [esp + 12] // stack address of a
+#define B2LO [esp + 16] // stack address of b
+#define B2HI [esp + 20] // stack address of b
mul ecx //eax has AHI, ecx has BLO, so AHI * BLO
mov ebx,eax //save result