about summary refs log tree commit diff
path: root/src/rt/sync/rust_thread.cpp
diff options
context:
space:
mode:
authorJyun-Yan You <jyyou@cs.nctu.edu.tw>2013-03-19 13:34:12 +0800
committerJyun-Yan You <jyyou.tw@gmail.com>2013-04-04 18:53:58 +0800
commitfdf48a7b52de948b3ec4ba187539a6164a56edcb (patch)
treebf36275edf4ce9dcde64757554985817e874bbd5 /src/rt/sync/rust_thread.cpp
parent99b156e78a592e8195ae7918a1ad958abef96050 (diff)
downloadrust-fdf48a7b52de948b3ec4ba187539a6164a56edcb.tar.gz
rust-fdf48a7b52de948b3ec4ba187539a6164a56edcb.zip
rt: improve mips backend
Diffstat (limited to 'src/rt/sync/rust_thread.cpp')
-rw-r--r--src/rt/sync/rust_thread.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rt/sync/rust_thread.cpp b/src/rt/sync/rust_thread.cpp
index 70fa08d7f2e..99613da9b0d 100644
--- a/src/rt/sync/rust_thread.cpp
+++ b/src/rt/sync/rust_thread.cpp
@@ -41,6 +41,9 @@ rust_thread::start() {
 #if defined(__WIN32__)
    thread = CreateThread(NULL, stack_sz, rust_thread_start, this, 0, NULL);
 #else
+   if (stack_sz < PTHREAD_STACK_MIN) {
+      stack_sz = PTHREAD_STACK_MIN;
+   }
    pthread_attr_t attr;
    CHECKED(pthread_attr_init(&attr));
    CHECKED(pthread_attr_setstacksize(&attr, stack_sz));