瀏覽代碼

Bernd Schmidt writes: make sure custom stacks work properly for no-mmu

Mike Frysinger 18 年之前
父節點
當前提交
d662b01231
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      libpthread/linuxthreads.old/manager.c

+ 7 - 0
libpthread/linuxthreads.old/manager.c

@@ -355,6 +355,13 @@ static int pthread_allocate_stack(const pthread_attr_t *attr,
       guardaddr = NULL;
       guardsize = 0;
       __pthread_nonstandard_stacks = 1;
+#ifndef __ARCH_USE_MMU__
+      /* check the initial thread stack boundaries so they don't overlap */
+      NOMMU_INITIAL_THREAD_BOUNDS((char *) new_thread, (char *) new_thread_bottom);
+
+      PDEBUG("initial stack: bos=%p, tos=%p\n", __pthread_initial_thread_bos,
+            __pthread_initial_thread_tos);
+#endif
     }
   else
     {