mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (rb_gc_finalize_deferred, rb_objspace_call_finalizer):
should use ATOMIC_EXCHANGE() to check the previous value. [ruby-dev:44596] [Bug #5439] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9f3f24e22a
commit
c180eabf8f
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
Thu Oct 13 18:04:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* gc.c (rb_gc_finalize_deferred, rb_objspace_call_finalizer):
|
||||
should use ATOMIC_EXCHANGE() to check the previous value.
|
||||
[ruby-dev:44596] [Bug #5439]
|
||||
|
||||
Wed Oct 12 23:39:58 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
|
||||
|
||||
* test/openssl/test_ssl.rb: Move duplicated tests for SSL::Session to
|
||||
|
|
4
gc.c
4
gc.c
|
@ -2977,7 +2977,7 @@ void
|
|||
rb_gc_finalize_deferred(void)
|
||||
{
|
||||
rb_objspace_t *objspace = &rb_objspace;
|
||||
if (ATOMIC_SET(finalizing, 1)) return;
|
||||
if (ATOMIC_EXCHANGE(finalizing, 1)) return;
|
||||
finalize_deferred(objspace);
|
||||
ATOMIC_SET(finalizing, 0);
|
||||
}
|
||||
|
@ -3031,7 +3031,7 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
|
|||
/* run finalizers */
|
||||
gc_clear_mark_on_sweep_slots(objspace);
|
||||
|
||||
if (ATOMIC_SET(finalizing, 1)) return;
|
||||
if (ATOMIC_EXCHANGE(finalizing, 1)) return;
|
||||
|
||||
do {
|
||||
/* XXX: this loop will make no sense */
|
||||
|
|
Loading…
Add table
Reference in a new issue