create_os_thread: put pthread stack inside alien-stack.
authorStas Boukarev <stassats@gmail.com>
Thu, 15 Aug 2013 17:00:06 +0000 (21:00 +0400)
committerStas Boukarev <stassats@gmail.com>
Thu, 15 Aug 2013 17:00:06 +0000 (21:00 +0400)
On !LISP_FEATURE_C_STACK_IS_CONTROL_STACK set pthread stack to
alien_stack, not control_stack.

src/runtime/thread.c

index 26f6de6..63527ba 100644 (file)
@@ -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))) {