ruby-changes:68019
From: John <ko1@a...>
Date: Fri, 17 Sep 2021 10:03:53 +0900 (JST)
Subject: [ruby-changes:68019] 5a048829a4 (master): Add WB_PROTECTED to mutexes
https://git.ruby-lang.org/ruby.git/commit/?id=5a048829a4 From 5a048829a488bb1cb4b0e77b3d46a1920ad92136 Mon Sep 17 00:00:00 2001 From: John Hawthorn <john@h...> Date: Wed, 15 Sep 2021 02:40:42 -0700 Subject: Add WB_PROTECTED to mutexes mutex_mark is (basically) NULL, so we don't have any references to mark. This means we should safely be able to mark Mutex as WB_PROTECTED without changing anything else. --- thread_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thread_sync.c b/thread_sync.c index ba5a78c..98d95ff 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -125,7 +125,7 @@ mutex_memsize(const void *ptr) https://github.com/ruby/ruby/blob/trunk/thread_sync.c#L125 static const rb_data_type_t mutex_data_type = { "mutex", {mutex_mark, mutex_free, mutex_memsize,}, - 0, 0, RUBY_TYPED_FREE_IMMEDIATELY + 0, 0, RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FREE_IMMEDIATELY }; static rb_mutex_t * -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/