summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2022-05-24 03:57:06 +0900
committerKoichi Sasada <ko1@atdot.net>2022-05-24 10:06:51 +0900
commitf3235ac09582c764086da28245a86753a100ba58 (patch)
treef2f687ba65f3eb49212f0ceb915f640cb9d57dfc /vm_core.h
parentd9984f39d32f4cd692a35f4d803f7754ea262805 (diff)
add `rb_th_serial()`
`rb_th_serial(th)` returns th's serial for debug print purpose.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5933
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 4de0777292..58fb1e7e3b 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -1078,6 +1078,12 @@ typedef struct rb_thread_struct {
#endif
} rb_thread_t;
+static inline unsigned int
+rb_th_serial(const rb_thread_t *th)
+{
+ return (unsigned int)th->serial;
+}
+
typedef enum {
VM_DEFINECLASS_TYPE_CLASS = 0x00,
VM_DEFINECLASS_TYPE_SINGLETON_CLASS = 0x01,