fix mac build and comment on stack size check
This commit is contained in:
parent
fdf48a7b52
commit
4f1d8cb6fc
1 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
|
||||
|
||||
#include "rust_thread.h"
|
||||
#include <limits.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue