about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-12-19 18:27:43 -0800
committerBrian Anderson <banderson@mozilla.com>2011-12-19 18:43:39 -0800
commit586281e2d6d7f63e2b2d2b09c7f310f3b1d35355 (patch)
tree2f817520bfcec2f5320e66f4e4dbacc1cb8c4606
parent1bfc4e2e6c931ca59d31e4621608e05035945f0b (diff)
downloadrust-586281e2d6d7f63e2b2d2b09c7f310f3b1d35355.tar.gz
rust-586281e2d6d7f63e2b2d2b09c7f310f3b1d35355.zip
libcore: Remove stack alignment from task spawning
This is already done by the native task start code. Closes #1324
-rw-r--r--src/libcore/task.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libcore/task.rs b/src/libcore/task.rs
index 5cb2af9679d..4d527cbe061 100644
--- a/src/libcore/task.rs
+++ b/src/libcore/task.rs
@@ -316,8 +316,9 @@ fn unsafe_spawn_inner(-thunk: fn@(),
     let thunkenv: *mutable uint = cast(sp - ptrsize);
     *thunkfn = cast(raw_thunk.code);;
     *thunkenv = cast(raw_thunk.env);;
-    // align the stack to 16 bytes
-    (**task_ptr).stack_ptr = cast(sp - ptrsize * 4u);
+    // Advance the stack pointer. No need to align because
+    // the native code will do that for us
+    (**task_ptr).stack_ptr = cast(sp - ptrsize * 2u);
 
     // set up notifications if they are enabled.
     alt notify {