aboutsummaryrefslogtreecommitdiffstats
path: root/vm_core.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2022-05-20 15:47:20 +0900
committerKoichi Sasada <ko1@atdot.net>2022-05-20 17:37:46 +0900
commiteab99b1d4b61fb85d994534826922f96cd14ae58 (patch)
tree16f57c273520f5ae7987d8879d13dcf39e64d5c2 /vm_core.h
parentaeea88174d88264469b406003765c7efdcd53edf (diff)
downloadruby-eab99b1d4b61fb85d994534826922f96cd14ae58.tar.gz
`rb_thread_t::serial` for debug
`rb_thread_t::serial` is auto-incremented serial number for threads and it can overflow, it means the serial is not a ID for each thread, it is only for debug print. `RUBY_DEBUG_LOG` shows this information. Also skip EC related information if EC is NULL. This patch enable to use `RUBY_DEBUG_LOG` without setup EC.
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index f09dd8237e..f25b74dcdd 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -997,6 +997,7 @@ typedef struct rb_thread_struct {
rb_execution_context_t *ec;
struct rb_thread_sched_item sched;
+ rb_atomic_t serial; // only for RUBY_DEBUG_LOG()
VALUE last_status; /* $? */