From 03d21a4fb099da7c52e6591e17704c297871b7db Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Fri, 22 Apr 2022 21:19:03 +0900 Subject: introduce struct `rb_native_thread` `rb_thread_t` contained `native_thread_data_t` to represent thread implementation dependent data. This patch separates them and rename it `rb_native_thread` and point it from `rb_thraed_t`. Now, 1 Ruby thread (`rb_thread_t`) has 1 native thread (`rb_native_thread`). --- thread_none.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'thread_none.h') diff --git a/thread_none.h b/thread_none.h index 3956fbfe7f..89f64667f0 100644 --- a/thread_none.h +++ b/thread_none.h @@ -8,8 +8,11 @@ // based implementation in vm.c #define RB_THREAD_LOCAL_SPECIFIER -typedef struct native_thread_data_struct {} native_thread_data_t; +struct rb_native_thread { + void *thread_id; // NULL +}; +struct rb_thread_sched_item {}; struct rb_thread_sched {}; RUBY_EXTERN struct rb_execution_context_struct *ruby_current_ec; -- cgit v1.2.1