summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2022-05-24 16:39:45 +0900
committerKoichi Sasada <ko1@atdot.net>2022-05-24 17:50:49 +0900
commit08cee2bf804d22dc51002b0df023aea7ec044d8d (patch)
tree9e9d8e959858bec1c0588f939e8c8be4ef9dc3b4 /thread_pthread.c
parent78785fb99041521fc5da01ffa6ab3f4f3936ce06 (diff)
downloadruby-08cee2bf804d22dc51002b0df023aea7ec044d8d.tar.gz
altstack is native thread's attr
Move th->altstack to th->nt->altstack.
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 451f47e07f..5c181556b9 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1052,7 +1052,7 @@ static void *
thread_start_func_1(void *th_ptr)
{
rb_thread_t *th = th_ptr;
- RB_ALTSTACK_INIT(void *altstack, th->altstack);
+ RB_ALTSTACK_INIT(void *altstack, th->nt->altstack);
#if USE_THREAD_CACHE
thread_start:
#endif
@@ -1208,7 +1208,7 @@ native_thread_create(rb_thread_t *th)
const size_t space = space_size(stack_size);
#ifdef USE_SIGALTSTACK
- th->altstack = rb_allocate_sigaltstack();
+ th->nt->altstack = rb_allocate_sigaltstack();
#endif
th->ec->machine.stack_maxsize = stack_size - space;