9#define LOCATION_ARGS const char *file, int line
10#define LOCATION_PARAMS file, line
11#define APPEND_LOCATION_ARGS , const char *file, int line
12#define APPEND_LOCATION_PARAMS , file, line
14#define LOCATION_ARGS void
15#define LOCATION_PARAMS
16#define APPEND_LOCATION_ARGS
17#define APPEND_LOCATION_PARAMS
39rb_multi_ractor_p(
void)
53rb_vm_lock(
const char *
file,
int line)
57 if (rb_multi_ractor_p()) {
63rb_vm_unlock(
const char *
file,
int line)
65 if (rb_multi_ractor_p()) {
71rb_vm_lock_enter(
unsigned int *lev,
const char *
file,
int line)
75 if (rb_multi_ractor_p()) {
81rb_vm_lock_enter_nb(
unsigned int *lev,
const char *
file,
int line)
85 if (rb_multi_ractor_p()) {
91rb_vm_lock_leave(
unsigned int *lev,
const char *
file,
int line)
93 if (rb_multi_ractor_p()) {
111#define RB_VM_LOCKED_P() rb_vm_locked_p()
113#define RB_VM_LOCK() rb_vm_lock(__FILE__, __LINE__)
114#define RB_VM_UNLOCK() rb_vm_unlock(__FILE__, __LINE__)
116#define RB_VM_LOCK_ENTER_CR_LEV(cr, levp) rb_vm_lock_enter_cr(cr, levp, __FILE__, __LINE__)
117#define RB_VM_LOCK_LEAVE_CR_LEV(cr, levp) rb_vm_lock_leave_cr(cr, levp, __FILE__, __LINE__)
118#define RB_VM_LOCK_ENTER_LEV(levp) rb_vm_lock_enter(levp, __FILE__, __LINE__)
119#define RB_VM_LOCK_LEAVE_LEV(levp) rb_vm_lock_leave(levp, __FILE__, __LINE__)
121#define RB_VM_LOCK_ENTER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV(&_lev);
122#define RB_VM_LOCK_LEAVE() RB_VM_LOCK_LEAVE_LEV(&_lev); }
124#define RB_VM_LOCK_ENTER_LEV_NB(levp) rb_vm_lock_enter_nb(levp, __FILE__, __LINE__)
125#define RB_VM_LOCK_ENTER_NO_BARRIER() { unsigned int _lev; RB_VM_LOCK_ENTER_LEV_NB(&_lev);
126#define RB_VM_LOCK_LEAVE_NO_BARRIER() RB_VM_LOCK_LEAVE_LEV(&_lev); }
129void RUBY_ASSERT_vm_locking(
void);
130void RUBY_ASSERT_vm_unlocking(
void);
131#define ASSERT_vm_locking() RUBY_ASSERT_vm_locking()
132#define ASSERT_vm_unlocking() RUBY_ASSERT_vm_unlocking()
134#define ASSERT_vm_locking()
135#define ASSERT_vm_unlocking()
#define RUBY_ASSERT(expr)
Asserts that the given expression is truthy iff RUBY_DEBUG is truthy.
#define RB_DEBUG_COUNTER_INC(type)
void rb_vm_unlock_body(LOCATION_ARGS)
void rb_vm_lock_enter_body(unsigned int *lev APPEND_LOCATION_ARGS)
void rb_vm_lock_enter_body_nb(unsigned int *lev APPEND_LOCATION_ARGS)
void rb_vm_lock_leave_body(unsigned int *lev APPEND_LOCATION_ARGS)
bool rb_vm_locked_p(void)
#define APPEND_LOCATION_PARAMS
void rb_vm_lock_body(LOCATION_ARGS)
struct rb_ractor_struct * ruby_single_main_ractor
void rb_vm_lock_enter_body_cr(struct rb_ractor_struct *cr, unsigned int *lev APPEND_LOCATION_ARGS)
#define APPEND_LOCATION_ARGS