diff options
author | John Hawthorn <john@hawthorn.email> | 2021-09-15 02:40:42 -0700 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2021-09-17 10:03:39 +0900 |
commit | 5a048829a488bb1cb4b0e77b3d46a1920ad92136 (patch) | |
tree | 61eb9adf453db5b320ffc31a59505b55447883c9 /thread_sync.c | |
parent | 34d6720fee545c42a24f88044d0f78db0477452d (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4852
Diffstat (limited to 'thread_sync.c')
-rw-r--r-- | thread_sync.c | 2 |
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 * |