summaryrefslogtreecommitdiff
path: root/thread_sync.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2021-09-15 02:40:42 -0700
committerKoichi Sasada <ko1@atdot.net>2021-09-17 10:03:39 +0900
commit5a048829a488bb1cb4b0e77b3d46a1920ad92136 (patch)
tree61eb9adf453db5b320ffc31a59505b55447883c9 /thread_sync.c
parent34d6720fee545c42a24f88044d0f78db0477452d (diff)
downloadruby-5a048829a488bb1cb4b0e77b3d46a1920ad92136.tar.gz
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.
Diffstat (limited to 'thread_sync.c')
-rw-r--r--thread_sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_sync.c b/thread_sync.c
index ba5a78ca0a..98d95ff009 100644
--- a/thread_sync.c
+++ b/thread_sync.c
@@ -125,7 +125,7 @@ mutex_memsize(const void *ptr)
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 *