summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
-rw-r--r--thread_pthread.c18
1 files changed, 17 insertions, 1 deletions
@@ -1157,6 +1157,11 @@ static void *
thread_start_func_1(void *th_ptr)
{
rb_thread_t *th = th_ptr;
RB_ALTSTACK_INIT(void *altstack, th->nt->altstack);
#if USE_THREAD_CACHE
thread_start:
@@ -1298,13 +1303,24 @@ clear_thread_cache_altstack(void)
}
#endif
static int
native_thread_create(rb_thread_t *th)
{
int err = 0;
VM_ASSERT(th->nt == 0);
- th->nt = ZALLOC(struct rb_native_thread);
if (use_cached_thread(th)) {
RUBY_DEBUG_LOG("use cached nt. th:%u", rb_th_serial(th));