rt: Make the initial segment of the main task's stack 1MB

This is a trick to fool microbenchmarks. Closes #1681
This commit is contained in:
Brian Anderson
2012-01-29 21:20:36 -08:00
parent 361f90e618
commit 6548cdd59b
7 changed files with 24 additions and 10 deletions

View File

@@ -151,15 +151,21 @@ rust_kernel::fail() {
}
rust_task_id
rust_kernel::create_task(rust_task *spawner, const char *name) {
rust_kernel::create_task(rust_task *spawner, const char *name,
size_t init_stack_sz) {
scoped_lock with(_kernel_lock);
rust_scheduler *thread = threads[isaac_rand(&rctx) % num_threads];
rust_task *t = thread->create_task(spawner, name);
rust_task *t = thread->create_task(spawner, name, init_stack_sz);
t->user.id = max_id++;
task_table.put(t->user.id, t);
return t->user.id;
}
rust_task_id
rust_kernel::create_task(rust_task *spawner, const char *name) {
return create_task(spawner, name, env->min_stack_size);
}
rust_task *
rust_kernel::get_task_by_id(rust_task_id id) {
scoped_lock with(_kernel_lock);