summaryrefslogtreecommitdiff
path: root/vm_sync.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-10-16 15:20:40 +0900
committerKoichi Sasada <ko1@atdot.net>2020-10-17 08:18:04 +0900
commitf6661f50854e0cdccb03ee516a21ce62adf6c802 (patch)
tree72668d7b8a8cdbe7f84234bdd99e93a9049a7918 /vm_sync.c
parent91ec5f9e39cf54dd7a157addb778293853571f13 (diff)
sync RClass::ext::iv_index_tbl
iv_index_tbl manages instance variable indexes (ID -> index). This data structure should be synchronized with other ractors so introduce some VM locks. This patch also introduced atomic ivar cache used by set/getinlinecache instructions. To make updating ivar cache (IVC), we changed iv_index_tbl data structure to manage (ID -> entry) and an entry points serial and index. IVC points to this entry so that cache update becomes atomically.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3662
Diffstat (limited to 'vm_sync.c')
-rw-r--r--vm_sync.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_sync.c b/vm_sync.c
index b670984a13..1b9897d807 100644
--- a/vm_sync.c
+++ b/vm_sync.c
@@ -124,14 +124,14 @@ vm_lock_leave(rb_vm_t *vm, unsigned int *lev APPEND_LOCATION_ARGS)
}
}
-void
+MJIT_FUNC_EXPORTED void
rb_vm_lock_enter_body(unsigned int *lev APPEND_LOCATION_ARGS)
{
rb_vm_t *vm = GET_VM();
vm_lock_enter(vm, vm_locked(vm), lev APPEND_LOCATION_PARAMS);
}
-void
+MJIT_FUNC_EXPORTED void
rb_vm_lock_leave_body(unsigned int *lev APPEND_LOCATION_ARGS)
{
vm_lock_leave(GET_VM(), lev APPEND_LOCATION_PARAMS);