Only set lockTaken to TRUE if it did not timeout.
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 27 Oct 2010 16:29:17 +0000 (14:29 -0200)
committerRodrigo Kumpera <kumpera@gmail.com>
Wed, 27 Oct 2010 16:29:17 +0000 (14:29 -0200)
mono/metadata/monitor.c

index f0e6a2c0cd379b9b7a556fb90d91d2c8924372ba..7a409e2d56ef64c38126af7013e59f0ab3b0dcef 100644 (file)
@@ -1169,7 +1169,7 @@ ves_icall_System_Threading_Monitor_Monitor_try_enter_with_atomic_var (MonoObject
                        mono_thread_interruption_checkpoint ();
        } while (res == -1);
        /*It's safe to do it from here since interruption would happen only on the wrapper.*/
-       *lockTaken = TRUE;
+       *lockTaken = res == 1;
 }
 
 gboolean