mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Extract vm_locked_by_ractor_p
This introduces a new method to encapsulate checking whether the current Ractor owns the vm->ractor.sync lock. This allows us to disable TSan on it since that operation should be safe, and still get validation of other uses.
This commit is contained in:
parent
7465e169da
commit
3ad2019259
3 changed files with 11 additions and 9 deletions
|
@ -12,7 +12,7 @@ void rb_ractor_sched_barrier_end(rb_vm_t *vm, rb_ractor_t *cr);
|
|||
static bool
|
||||
vm_locked(rb_vm_t *vm)
|
||||
{
|
||||
return vm->ractor.sync.lock_owner == GET_RACTOR();
|
||||
return vm_locked_by_ractor_p(vm, GET_RACTOR());
|
||||
}
|
||||
|
||||
#if RUBY_DEBUG > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue