From 4f1d8cb6fce625d13baf12f49e41d29f1433c8dd Mon Sep 17 00:00:00 2001 From: Jyun-Yan You Date: Fri, 29 Mar 2013 11:31:34 +0800 Subject: fix mac build and comment on stack size check --- src/rt/sync/rust_thread.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/rt/sync/rust_thread.cpp') diff --git a/src/rt/sync/rust_thread.cpp b/src/rt/sync/rust_thread.cpp index 99613da9b0d..824642fc435 100644 --- a/src/rt/sync/rust_thread.cpp +++ b/src/rt/sync/rust_thread.cpp @@ -10,6 +10,7 @@ #include "rust_thread.h" +#include const size_t default_stack_sz = 1024*1024; @@ -41,6 +42,8 @@ rust_thread::start() { #if defined(__WIN32__) thread = CreateThread(NULL, stack_sz, rust_thread_start, this, 0, NULL); #else + // PTHREAD_STACK_MIN of some system is larger than default size + // so we check stack_sz to prevent assertion failure. if (stack_sz < PTHREAD_STACK_MIN) { stack_sz = PTHREAD_STACK_MIN; } -- cgit 1.4.1-3-g733a5