Skip to content

Commit 4f1d8cb

Browse files
committedApr 4, 2013
fix mac build and comment on stack size check
1 parent fdf48a7 commit 4f1d8cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/rt/sync/rust_thread.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111

1212
#include "rust_thread.h"
13+
#include <limits.h>
1314

1415
const size_t default_stack_sz = 1024*1024;
1516

@@ -41,6 +42,8 @@ rust_thread::start() {
4142
#if defined(__WIN32__)
4243
thread = CreateThread(NULL, stack_sz, rust_thread_start, this, 0, NULL);
4344
#else
45+
// PTHREAD_STACK_MIN of some system is larger than default size
46+
// so we check stack_sz to prevent assertion failure.
4447
if (stack_sz < PTHREAD_STACK_MIN) {
4548
stack_sz = PTHREAD_STACK_MIN;
4649
}

5 commit comments

Comments
 (5)

bors commented on Apr 4, 2013

@bors
Collaborator

saw approval from brson
at crabtw@4f1d8cb

bors commented on Apr 4, 2013

@bors
Collaborator

merging crabtw/rust/mips-rt = 4f1d8cb into auto

bors commented on Apr 4, 2013

@bors
Collaborator

crabtw/rust/mips-rt = 4f1d8cb merged ok, testing candidate = c08fb75

bors commented on Apr 4, 2013

@bors
Collaborator

fast-forwarding incoming to auto = c08fb75

Please sign in to comment.