ruby-changes:31960
From: ko1 <ko1@a...>
Date: Fri, 6 Dec 2013 19:09:44 +0900 (JST)
Subject: [ruby-changes:31960] ko1:r44039 (trunk): * gc.c (atomic_sub_nounderflow): not 0 but val itself.
ko1 2013-12-06 19:09:38 +0900 (Fri, 06 Dec 2013) New Revision: 44039 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44039 Log: * gc.c (atomic_sub_nounderflow): not 0 but val itself. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 44038) +++ ChangeLog (revision 44039) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Dec 6 19:08:48 2013 Koichi Sasada <ko1@a...> + + * gc.c (atomic_sub_nounderflow): not 0 but val itself. + Fri Dec 6 18:37:11 2013 Koichi Sasada <ko1@a...> * gc.c (rb_objspace_alloc, Init_heap): initialize Index: gc.c =================================================================== --- gc.c (revision 44038) +++ gc.c (revision 44039) @@ -5816,7 +5816,7 @@ atomic_sub_nounderflow(size_t *var, size https://github.com/ruby/ruby/blob/trunk/gc.c#L5816 while (1) { size_t val = *var; - if (val < sub) sub = 0; + if (val < sub) sub = val; if (ATOMIC_SIZE_CAS(*var, val, val-sub) == val) break; } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/