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

@@ -20,7 +20,9 @@ rust_scheduler::rust_scheduler(rust_kernel *kernel,
cache(this),
kernel(kernel),
message_queue(message_queue),
id(id)
id(id),
min_stack_size(kernel->env->min_stack_size),
env(kernel->env)
{
LOGPTR(this, "new dom", (uintptr_t)this);
isaac_init(this, &rctx);