Skip to content

Commit

Permalink
fix mac build and comment on stack size check
Browse files Browse the repository at this point in the history
  • Loading branch information
crabtw committed Apr 4, 2013
1 parent fdf48a7 commit 4f1d8cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rt/sync/rust_thread.cpp
Expand Up @@ -10,6 +10,7 @@


#include "rust_thread.h"
#include <limits.h>

const size_t default_stack_sz = 1024*1024;

Expand Down Expand Up @@ -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;
}
Expand Down

5 comments on commit 4f1d8cb

@bors
Copy link
Contributor

@bors bors commented on 4f1d8cb Apr 4, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at crabtw@4f1d8cb

@bors
Copy link
Contributor

@bors bors commented on 4f1d8cb Apr 4, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bors
Copy link
Contributor

@bors bors commented on 4f1d8cb Apr 4, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bors
Copy link
Contributor

@bors bors commented on 4f1d8cb Apr 4, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 4f1d8cb Apr 4, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = c08fb75

Please sign in to comment.