summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 2d92d9b9f8..72e2bcb6fb 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -942,6 +942,10 @@ struct rb_ext_config {
typedef struct rb_ractor_struct rb_ractor_t;
+#if defined(__linux__) || defined(__FreeBSD__)
+# define RB_THREAD_T_HAS_NATIVE_ID
+#endif
+
typedef struct rb_thread_struct {
struct list_node lt_node; // managed by a ractor
VALUE self;
@@ -964,6 +968,9 @@ typedef struct rb_thread_struct {
#ifdef NON_SCALAR_THREAD_ID
rb_thread_id_string_t thread_id_string;
#endif
+#ifdef RB_THREAD_T_HAS_NATIVE_ID
+ int tid;
+#endif
BITFIELD(enum rb_thread_status, status, 2);
/* bit flags */
unsigned int to_kill : 1;