diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2024-09-10 11:25:47 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2024-09-12 10:15:25 -0400 |
| commit | b10500b72b2a696608015c2a2e60422a296d8614 (patch) | |
| tree | 3d323efa13fafdb6b1172fa620ce3138d0ceb809 | |
| parent | f47c057c327467a8dcdb8482b13d2ea281a6ad6f (diff) | |
Assume VM is locked in rb_vm_ci_free
The GC always locks the VM, so we don't need to lock it in rb_vm_ci_free.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11585
| -rw-r--r-- | vm_method.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/vm_method.c b/vm_method.c index 4f82efbf00..bda3837f74 100644 --- a/vm_method.c +++ b/vm_method.c @@ -434,14 +434,12 @@ rb_vm_ci_lookup(ID mid, unsigned int flag, unsigned int argc, const struct rb_ca void rb_vm_ci_free(const struct rb_callinfo *ci) { + ASSERT_vm_locking(); + rb_vm_t *vm = GET_VM(); - RB_VM_LOCK_ENTER(); - { - st_data_t key = (st_data_t)ci; - st_delete(vm->ci_table, &key, NULL); - } - RB_VM_LOCK_LEAVE(); + st_data_t key = (st_data_t)ci; + st_delete(vm->ci_table, &key, NULL); } void |
