1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c (atomic_sub_nounderflow): not 0 but val itself.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2013-12-06 10:09:38 +00:00
parent e4720e1118
commit f09058b877
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Fri Dec 6 19:08:48 2013 Koichi Sasada <ko1@atdot.net>
* gc.c (atomic_sub_nounderflow): not 0 but val itself.
Fri Dec 6 18:37:11 2013 Koichi Sasada <ko1@atdot.net>
* gc.c (rb_objspace_alloc, Init_heap): initialize

2
gc.c
View file

@ -5816,7 +5816,7 @@ atomic_sub_nounderflow(size_t *var, size_t sub)
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;
}
}