Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch While the previous change actually made the code do...



details:   https://anonhg.NetBSD.org/src/rev/9ff960118352
branches:  trunk
changeset: 547111:9ff960118352
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Tue May 13 09:35:16 2003 +0000

description:
While the previous change actually made the code do what it intended,
it was still wrong. cpu_switch() must return 1 when it switched to
a different LWP, 0 if it didn't. It was doing exactly the reverse.

diffstat:

 sys/arch/amd64/amd64/locore.S |  6 +++---
 sys/arch/i386/i386/locore.S   |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 942078c9b7a8 -r 9ff960118352 sys/arch/amd64/amd64/locore.S
--- a/sys/arch/amd64/amd64/locore.S     Tue May 13 09:31:56 2003 +0000
+++ b/sys/arch/amd64/amd64/locore.S     Tue May 13 09:35:16 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.3 2003/05/13 08:33:58 fvdl Exp $  */
+/*     $NetBSD: locore.S,v 1.4 2003/05/13 09:35:16 fvdl Exp $  */
 
 /*
  * Copyright-o-rama!
@@ -939,7 +939,7 @@
        SET_CURLWP(%r12,%rcx)
 
        /* Skip context switch if same lwp. */
-       movl    $1,%ebx
+       xorl    %ebx,%ebx
        cmpq    %r12,%r13
        je      switch_return
 
@@ -1037,7 +1037,7 @@
        je      1f
        movq    %rax,TF_RIP(%rbx)
 1:
-       xor     %rbx,%rbx
+       movl    $1,%ebx
 
 switch_return:
 #if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)     
diff -r 942078c9b7a8 -r 9ff960118352 sys/arch/i386/i386/locore.S
--- a/sys/arch/i386/i386/locore.S       Tue May 13 09:31:56 2003 +0000
+++ b/sys/arch/i386/i386/locore.S       Tue May 13 09:35:16 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.9 2003/05/13 08:26:32 fvdl Exp $  */
+/*     $NetBSD: locore.S,v 1.10 2003/05/13 09:35:16 fvdl Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -1853,7 +1853,7 @@
        SET_CURLWP(%edi,%ecx)
 
        /* Skip context switch if same lwp. */
-       movl    $1, %ebx
+       xorl    %ebx,%ebx
        cmpl    %edi,%esi
        je      switch_return
 
@@ -1961,7 +1961,7 @@
        je      1f
        movl    %eax,TF_EIP(%ebx)
 1:
-       xor     %ebx,%ebx
+       movl    $1,%ebx
 
 switch_return:
 #if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)     



Home | Main Index | Thread Index | Old Index