Remove unnecessary test for switching from null current thread.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 9 Apr 2006 19:52:03 +0000 (19:52 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 9 Apr 2006 19:52:03 +0000 (19:52 +0000)
Thanks to "Waqar Mohsin" <wmohsin@gmail.com> for reporting this.

src/threads/switch.S

index 6cb70aa86e38b8ad85c930376e260ce7ef43cf1d..48fc588973bfe15c016dab042bc75f37c6baba62 100644 (file)
@@ -33,10 +33,7 @@ switch_threads:
 
        # Save current stack pointer to old thread's stack, if any.
        movl SWITCH_CUR(%esp), %eax
-       test %eax, %eax
-       jz 1f
        movl %esp, (%eax,%edx,1)
-1:
 
        # Restore stack pointer from new thread's stack.
        movl SWITCH_NEXT(%esp), %ecx