diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-09-09 23:21:06 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-09-11 08:41:32 +0900 |
commit | cd829bb078e6a3486d9b5ea57fc5111d289c1860 (patch) | |
tree | f1c903880d0ed454250f95d95a6e6d765a899796 /ractor_core.h | |
parent | 967b9743faac0b55a3d8deb176a08fdff449bba8 (diff) |
Remove printf family from the mjit header
Linking printf family functions makes mjit objects to link
unnecessary code.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4820
Diffstat (limited to 'ractor_core.h')
-rw-r--r-- | ractor_core.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ractor_core.h b/ractor_core.h index 879d8683fe..a2dc99df88 100644 --- a/ractor_core.h +++ b/ractor_core.h @@ -237,9 +237,11 @@ rb_ractor_sleeper_thread_num(rb_ractor_t *r) static inline void rb_ractor_thread_switch(rb_ractor_t *cr, rb_thread_t *th) { - if (cr->threads.running_ec != th->ec) { - if (0) fprintf(stderr, "rb_ractor_thread_switch ec:%p->%p\n", - (void *)cr->threads.running_ec, (void *)th->ec); + if (cr->threads.running_ec != th->ec) { + if (0) { + ruby_debug_printf("rb_ractor_thread_switch ec:%p->%p\n", + (void *)cr->threads.running_ec, (void *)th->ec); + } } else { return; @@ -268,8 +270,10 @@ rb_ractor_set_current_ec(rb_ractor_t *cr, rb_execution_context_t *ec) #endif if (cr->threads.running_ec != ec) { - if (0) fprintf(stderr, "rb_ractor_set_current_ec ec:%p->%p\n", - (void *)cr->threads.running_ec, (void *)ec); + if (0) { + ruby_debug_printf("rb_ractor_set_current_ec ec:%p->%p\n", + (void *)cr->threads.running_ec, (void *)ec); + } } else { VM_ASSERT(0); // should be different |