summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2021-10-27 11:44:29 +0900
committerNobuyoshi Nakada <[email protected]>2025-05-25 15:22:42 +0900
commitf2ca66fefc809f3a6f92864d3e7d3f1769f7bfbd ()
treeb928c0d7d35d8992883cc17358039a6cc164846e
parent87d340f0e129ecf807e3be35d67fda1ad6f40389 (diff)
Add RB_VM_LOCKING macro which delimits the variable scope
Notes: Merged: https://.com/ruby/ruby/pull/13439
-rw-r--r--vm_sync.h6
1 files changed, 6 insertions, 0 deletions
@@ -119,10 +119,16 @@ rb_vm_lock_leave_cr(struct rb_ractor_struct *cr, unsigned int *levp, const char
#define RB_VM_LOCK_ENTER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV(&_lev);
#define RB_VM_LOCK_LEAVE() RB_VM_LOCK_LEAVE_LEV(&_lev); }
#define RB_VM_LOCK_ENTER_LEV_NB(levp) rb_vm_lock_enter_nb(levp, __FILE__, __LINE__)
#define RB_VM_LOCK_ENTER_NO_BARRIER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV_NB(&_lev);
#define RB_VM_LOCK_LEAVE_NO_BARRIER() RB_VM_LOCK_LEAVE_LEV(&_lev); }
#if RUBY_DEBUG > 0
void RUBY_ASSERT_vm_locking(void);