Do all runtime calls to getenv at initialization

getenv is not threadsafe and (maybe as a result) it's randomly crashing with
CFLAGS=-g and RUST_THREADS=32. Calls from rust code are still on their
own.
This commit is contained in:
Brian Anderson
2011-07-27 14:34:39 -07:00
parent 75985ab75e
commit 4ef1ec580a
17 changed files with 182 additions and 86 deletions

View File

@@ -857,10 +857,10 @@ clone_chan(rust_task *task, rust_chan *chan) {
}
// defined in rust_task.cpp
extern size_t g_min_stack_size;
extern size_t g_custom_min_stack_size;
extern "C" CDECL void
set_min_stack(rust_task *task, uintptr_t stack_size) {
g_min_stack_size = stack_size;
g_custom_min_stack_size = stack_size;
}
//