summaryrefslogtreecommitdiff
path: root/mjit.h
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-06-10 00:32:15 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2021-06-10 00:32:24 -0700
commitc5e8a49bdeadd8e424274c17c0d2a9ffed64417b (patch)
treef8f95bac341505213430cd2b61a846dc7cee089f /mjit.h
parent791d7d49476e6363c1bd24af637a9581acc627bb (diff)
Avoid enqueueing the same ISeq twice
by a race condition by multiple Ractors. Atmically incrementing body->total_calls may have its own cost, so for now we intentionally leave the unreliable total_calls. So we allow an ISeq to be never pushed when you use multiple Ractors. However, if you enqueue a single ccan node twice, get_from_list loops infinitely. Thus this patch takes care of such a situation.
Diffstat (limited to 'mjit.h')
-rw-r--r--mjit.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mjit.h b/mjit.h
index 8cfc3d05b7..4d27e39e3c 100644
--- a/mjit.h
+++ b/mjit.h
@@ -20,7 +20,7 @@
// Special address values of a function generated from the
// corresponding iseq by MJIT:
enum rb_mjit_iseq_func {
- // ISEQ was not queued yet for the machine code generation
+ // ISEQ has never been enqueued to unit_queue yet
NOT_ADDED_JIT_ISEQ_FUNC = 0,
// ISEQ is already queued for the machine code generation but the
// code is not ready yet for the execution