diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-20 21:38:27 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-20 21:38:27 +0000 |
commit | 475b4aa40b6cf83e57176a063d368d55bf779e7c (patch) | |
tree | 569c6a6db871c4e762b293038ed456afbcf36c1c /thread.c | |
parent | e72a86fc9373e4477b6e275735fecdf4eac9944a (diff) |
simplify altstack and enable reuse with thread cache
Instead of allocating and registering the altstack in different
places, do it together to reduce code and improve readability.
When thread cache is enabled, storing altstack in rb_thread_t
is wasteful and we may reuse altstack in the same pthread.
This also lets us clearly allow use of xmalloc to allow GC to
recover from ENOMEM.
[ruby-core:85621] [Feature #14487]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -652,11 +652,6 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s rb_thread_list_t *join_list; rb_thread_t *main_th; VALUE errinfo = Qnil; -# ifdef USE_SIGALTSTACK - void rb_register_sigaltstack(rb_thread_t *th); - - rb_register_sigaltstack(th); -# endif if (th == th->vm->main_thread) rb_bug("thread_start_func_2 must not be used for main thread"); |