summaryrefslogtreecommitdiff
path: root/thread_none.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2022-04-22 21:19:03 +0900
committerKoichi Sasada <ko1@atdot.net>2022-04-23 03:08:27 +0900
commit03d21a4fb099da7c52e6591e17704c297871b7db (patch)
treedb2d58907b7c841d8ca15967f063d229bd9e37cc /thread_none.h
parent69d41480ec1c91691b79f106f5376a2e2cab3a82 (diff)
downloadruby-03d21a4fb099da7c52e6591e17704c297871b7db.tar.gz
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`).
Diffstat (limited to 'thread_none.h')
-rw-r--r--thread_none.h5
1 files changed, 4 insertions, 1 deletions
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;