Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/include Adjust ci on the second iteration.



details:   https://anonhg.NetBSD.org/src/rev/fcd4345923c3
branches:  trunk
changeset: 321253:fcd4345923c3
user:      maya <maya%NetBSD.org@localhost>
date:      Wed Mar 07 23:08:29 2018 +0000

description:
Adjust ci on the second iteration.

Now a MULTIPROCESSOR+LOCKDEBUG ERLITE reaches userland again

diffstat:

 sys/arch/mips/include/cpu.h |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (24 lines):

diff -r db2abeb962f5 -r fcd4345923c3 sys/arch/mips/include/cpu.h
--- a/sys/arch/mips/include/cpu.h       Wed Mar 07 22:40:26 2018 +0000
+++ b/sys/arch/mips/include/cpu.h       Wed Mar 07 23:08:29 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.123 2018/01/22 23:20:26 maya Exp $   */
+/*     $NetBSD: cpu.h,v 1.124 2018/03/07 23:08:29 maya Exp $   */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -160,9 +160,11 @@
 #ifdef MULTIPROCESSOR
 #define        CPU_INFO_ITERATOR               int
 #define        CPU_INFO_FOREACH(cii, ci)       \
-    cii = 0, ci = (ncpu ? cpu_infos[0] : &cpu_info_store); \
-    cii < (ncpu ? ncpu : 1); \
-    ++cii
+    cii = 0, ci = &cpu_info_store; \
+    ci != NULL; \
+    cii++, \
+    ncpu ? (ci = cpu_infos[cii]) \
+         : (ci = NULL)
 #else
 #define        CPU_INFO_ITERATOR               int __unused
 #define        CPU_INFO_FOREACH(cii, ci)       \



Home | Main Index | Thread Index | Old Index