diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2021-06-01 00:15:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 00:15:51 -0700 |
commit | e1b03b0c2b2449a7794f4701bab8b2382eb15116 (patch) | |
tree | 2fc8c9db992a16e110357833baa2afb8ae286e35 /ractor.c | |
parent | 0d32a18f5b8cb07ef766ac3ae6de6d41c95af43f (diff) |
Enable VM_ASSERT in --jit CIs (#4543)
Notes
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
Diffstat (limited to 'ractor.c')
-rw-r--r-- | ractor.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -34,7 +34,7 @@ ASSERT_ractor_unlocking(rb_ractor_t *r) { #if RACTOR_CHECK_MODE > 0 // GET_EC is NULL in an MJIT worker - if (GET_EC() != NULL && r->sync.locked_by == rb_ractor_self(GET_RACTOR())) { + if (rb_current_execution_context(false) != NULL && r->sync.locked_by == rb_ractor_self(GET_RACTOR())) { rb_bug("recursive ractor locking"); } #endif @@ -45,7 +45,7 @@ ASSERT_ractor_locking(rb_ractor_t *r) { #if RACTOR_CHECK_MODE > 0 // GET_EC is NULL in an MJIT worker - if (GET_EC() != NULL && r->sync.locked_by != rb_ractor_self(GET_RACTOR())) { + if (rb_current_execution_context(false) != NULL && r->sync.locked_by != rb_ractor_self(GET_RACTOR())) { rp(r->sync.locked_by); rb_bug("ractor lock is not acquired."); } @@ -61,7 +61,7 @@ ractor_lock(rb_ractor_t *r, const char *file, int line) rb_native_mutex_lock(&r->sync.lock); #if RACTOR_CHECK_MODE > 0 - if (GET_EC() != NULL) { // GET_EC is NULL in an MJIT worker + if (rb_current_execution_context(false) != NULL) { // GET_EC is NULL in an MJIT worker r->sync.locked_by = rb_ractor_self(GET_RACTOR()); } #endif |