]> git.lizzy.rs Git - rust.git/commitdiff
libcore: Remove stack alignment from task spawning
authorBrian Anderson <banderson@mozilla.com>
Tue, 20 Dec 2011 02:27:43 +0000 (18:27 -0800)
committerBrian Anderson <banderson@mozilla.com>
Tue, 20 Dec 2011 02:43:39 +0000 (18:43 -0800)
This is already done by the native task start code. Closes #1324

src/libcore/task.rs

index 5cb2af9679d4f1e861b75ae0488d73cfd5ae7ece..4d527cbe061970fb9631118259147fdfab906d06 100644 (file)
@@ -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 {