[Mono-bugs] [Bug 70784][Nor] Changed - Problem with Threading.Interlocked.Increment

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 23 Dec 2004 18:08:14 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by grompf@sublimeintervention.com.

http://bugzilla.ximian.com/show_bug.cgi?id=70784

--- shadow/70784	2004-12-23 18:06:08.000000000 -0500
+++ shadow/70784.tmp.14822	2004-12-23 18:08:14.000000000 -0500
@@ -131,6 +131,22 @@
 a5
 
 ------- Additional Comments From grompf@sublimeintervention.com  2004-12-23 18:06 -------
 Created an attachment (id=13586)
 proposed patch
 
+
+------- Additional Comments From grompf@sublimeintervention.com  2004-12-23 18:08 -------
+Looking at mini-x86.c the original code for the new inline exchange was doing
+
+mov    %ecx,%eax
+add    %ecx,%eax
+
+Where %ecx was the xadded original value going into the lock.
+
+This will double the incoming value for return; rather than returning the value.
+
+I'm not positive this patch addresses all cases; pehaps the if () should be removed as well 
+before the membase move?
+
+-kangaroo
+