summaryrefslogtreecommitdiff
path: root/vm_sync.c
diff options
context:
space:
mode:
-rw-r--r--vm_sync.c21
1 files changed, 10 insertions, 11 deletions
@@ -116,6 +116,7 @@ vm_lock_leave(rb_vm_t *vm, unsigned int *lev APPEND_LOCATION_ARGS)
VM_ASSERT(vm->ractor.sync.lock_rec == *lev);
vm->ractor.sync.lock_rec--;
if (vm->ractor.sync.lock_rec == 0) {
vm->ractor.sync.lock_owner = NULL;
@@ -248,21 +249,19 @@ rb_vm_barrier(void)
}
void
-rb_ec_vm_lock_rec_release(rb_execution_context_t *ec, int recorded_lock_rec)
{
- int current_lock_rec = rb_ec_vm_lock_rec(ec);
- unsigned int lev;
-
- bp();
- if (recorded_lock_rec > current_lock_rec) {
- for (; recorded_lock_rec > current_lock_rec; current_lock_rec++) {
- RB_VM_LOCK_ENTER_LEV(&lev);
- }
}
else {
- for (; recorded_lock_rec < current_lock_rec; current_lock_rec--) {
- RB_VM_LOCK_LEAVE_LEV(&lev);
}
}