From 2b69e4fdba7249fb494635bf78bb3595e34c1eb7 Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Thu, 15 Aug 2013 21:00:06 +0400 Subject: [PATCH] create_os_thread: put pthread stack inside alien-stack. On !LISP_FEATURE_C_STACK_IS_CONTROL_STACK set pthread stack to alien_stack, not control_stack. --- src/runtime/thread.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/runtime/thread.c b/src/runtime/thread.c index 26f6de6..63527ba 100644 --- a/src/runtime/thread.c +++ b/src/runtime/thread.c @@ -835,8 +835,13 @@ boolean create_os_thread(struct thread *th,os_thread_t *kid_tid) #if defined(LISP_FEATURE_WIN32) (pthread_attr_setstacksize(th->os_attr, thread_control_stack_size)) || #else +# if defined(LISP_FEATURE_C_STACK_IS_CONTROL_STACK) (pthread_attr_setstack(th->os_attr,th->control_stack_start, thread_control_stack_size)) || +# else + (pthread_attr_setstack(th->os_attr,th->alien_stack_start, + ALIEN_STACK_SIZE)) || +# endif #endif (retcode = pthread_create (kid_tid,th->os_attr,(void *(*)(void *))new_thread_trampoline,th))) { -- 1.7.10.4