Source-Changes-HG archive

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

[src/trunk]: src/sys/arch make cpu_need_resched() macros consistent; __USE flags



details:   https://anonhg.NetBSD.org/src/rev/9bd742c5a8a5
branches:  trunk
changeset: 790715:9bd742c5a8a5
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Oct 19 19:20:59 2013 +0000

description:
make cpu_need_resched() macros consistent; __USE flags

diffstat:

 sys/arch/amiga/include/cpu.h   |  8 ++++++--
 sys/arch/atari/include/cpu.h   |  8 ++++++--
 sys/arch/cesfic/include/cpu.h  |  9 ++++++---
 sys/arch/hp300/include/cpu.h   |  9 ++++++---
 sys/arch/ia64/include/cpu.h    |  8 +++++---
 sys/arch/luna68k/include/cpu.h |  8 ++++++--
 sys/arch/mac68k/include/cpu.h  |  8 ++++++--
 sys/arch/mvme68k/include/cpu.h |  9 ++++++---
 sys/arch/news68k/include/cpu.h |  9 ++++++---
 sys/arch/next68k/include/cpu.h |  9 ++++++---
 sys/arch/sh3/include/cpu.h     |  3 ++-
 sys/arch/sparc/include/cpu.h   |  3 ++-
 sys/arch/sun68k/include/cpu.h  |  9 ++++++---
 sys/arch/vax/include/cpu.h     |  3 ++-
 sys/arch/x68k/include/cpu.h    |  9 ++++++---
 15 files changed, 77 insertions(+), 35 deletions(-)

diffs (truncated from 322 to 300 lines):

diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/amiga/include/cpu.h
--- a/sys/arch/amiga/include/cpu.h      Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/amiga/include/cpu.h      Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.79 2011/05/16 13:22:52 tsutsui Exp $ */
+/*     $NetBSD: cpu.h,v 1.80 2013/10/19 19:20:59 christos Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -77,7 +77,11 @@
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
  */
-#define        cpu_need_resched(ci,flags)      {ci->ci_want_resched = 1; setsoftast();}
+#define        cpu_need_resched(ci,flags)      do {    \
+       __USE(flags);                           \
+       ci->ci_want_resched = 1;                \
+       setsoftast();                           \
+} while (/*CONSTCOND*/0)
 
 /*
  * Give a profiling tick to the current process from the softclock
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/atari/include/cpu.h
--- a/sys/arch/atari/include/cpu.h      Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/atari/include/cpu.h      Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.69 2012/02/02 16:59:42 tsutsui Exp $ */
+/*     $NetBSD: cpu.h,v 1.70 2013/10/19 19:20:59 christos Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -85,7 +85,11 @@
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
  */
-#define        cpu_need_resched(ci,flags)      {ci->ci_want_resched = 1; setsoftast();}
+#define        cpu_need_resched(ci,flags)      do {    \
+       __USE(flags);                           \
+       ci->ci_want_resched = 1;                \
+       setsoftast();                           \
+} while (/*CONSTCOND*/0)
 
 /*
  * Give a profiling tick to the current process from the softclock
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/cesfic/include/cpu.h
--- a/sys/arch/cesfic/include/cpu.h     Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/cesfic/include/cpu.h     Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.28 2012/02/02 16:59:42 tsutsui Exp $ */
+/*     $NetBSD: cpu.h,v 1.29 2013/10/19 19:20:59 christos Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -79,8 +79,11 @@
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
  */
-#define        cpu_need_resched(ci, flags)     \
-       do { ci->ci_want_resched = 1; aston(); } while (/* CONSTCOND */0)
+#define        cpu_need_resched(ci,flags)      do {    \
+       __USE(flags);                           \
+       ci->ci_want_resched = 1;                \
+       aston();                                \
+} while (/*CONSTCOND*/0)
 
 /*
  * Give a profiling tick to the current process when the user profiling
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/hp300/include/cpu.h
--- a/sys/arch/hp300/include/cpu.h      Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/hp300/include/cpu.h      Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.67 2012/02/02 16:59:42 tsutsui Exp $ */
+/*     $NetBSD: cpu.h,v 1.68 2013/10/19 19:20:59 christos Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -88,8 +88,11 @@
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
  */
-#define        cpu_need_resched(ci, flags)     \
-       do { ci->ci_want_resched = 1; aston(); } while (/* CONSTCOND */0)
+#define        cpu_need_resched(ci,flags)      do {    \
+       __USE(flags);                           \
+       ci->ci_want_resched = 1;                \
+       aston();                                \
+} while (/*CONSTCOND*/0)
 
 /*
  * Give a profiling tick to the current process when the user profiling
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/ia64/include/cpu.h
--- a/sys/arch/ia64/include/cpu.h       Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/ia64/include/cpu.h       Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.10 2011/10/01 15:59:28 chs Exp $     */
+/*     $NetBSD: cpu.h,v 1.11 2013/10/19 19:20:59 christos Exp $        */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -163,8 +163,10 @@
 #define        cpu_signotify(l)        aston(l)
 
 // void cpu_need_resched(struct cpu_info *ci, int flags)
-#define cpu_need_resched(ci, f) do { \
-} while(0)
+#define cpu_need_resched(ci, f) do {   \
+       __USE(ci);                      \
+       __USE(f);                       \
+} while(/*CONSTCOND*/0)
 
 #define setsoftclock()              /*XXX: FIXME */
 
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/luna68k/include/cpu.h
--- a/sys/arch/luna68k/include/cpu.h    Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/luna68k/include/cpu.h    Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.31 2012/02/02 16:59:42 tsutsui Exp $ */
+/* $NetBSD: cpu.h,v 1.32 2013/10/19 19:20:59 christos Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -80,7 +80,11 @@
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
  */
-#define cpu_need_resched(ci,flags)     { ci->ci_want_resched = 1; aston(); }
+#define        cpu_need_resched(ci,flags)      do {    \
+       __USE(flags);                           \
+       ci->ci_want_resched = 1;                \
+       aston();                                \
+} while (/*CONSTCOND*/0)
 
 /*
  * Give a profiling tick to the current process when the user profiling
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/mac68k/include/cpu.h
--- a/sys/arch/mac68k/include/cpu.h     Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/mac68k/include/cpu.h     Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.97 2012/02/02 16:59:43 tsutsui Exp $ */
+/*     $NetBSD: cpu.h,v 1.98 2013/10/19 19:20:59 christos Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -99,7 +99,11 @@
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
  */
-#define        cpu_need_resched(ci, v) { ci->ci_want_resched++; aston(); }
+#define        cpu_need_resched(ci,flags)      do {    \
+       __USE(flags);                           \
+       ci->ci_want_resched = 1;                \
+       aston();                                \
+} while (/*CONSTCOND*/0)
 
 /*
  * Give a profiling tick to the current process from the softclock
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/mvme68k/include/cpu.h
--- a/sys/arch/mvme68k/include/cpu.h    Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/mvme68k/include/cpu.h    Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.47 2012/02/02 16:59:43 tsutsui Exp $ */
+/*     $NetBSD: cpu.h,v 1.48 2013/10/19 19:20:59 christos Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -86,8 +86,11 @@
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
  */
-#define        cpu_need_resched(ci, flags)     \
-       do { ci->ci_want_resched++; aston(); } while (/* CONSTCOND */0)
+#define        cpu_need_resched(ci,flags)      do {    \
+       __USE(flags);                           \
+       ci->ci_want_resched = 1;                \
+       aston();                                \
+} while (/*CONSTCOND*/0)
 
 /*
  * Give a profiling tick to the current process when the user profiling
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/news68k/include/cpu.h
--- a/sys/arch/news68k/include/cpu.h    Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/news68k/include/cpu.h    Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.41 2012/02/02 16:59:43 tsutsui Exp $ */
+/*     $NetBSD: cpu.h,v 1.42 2013/10/19 19:20:59 christos Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -104,8 +104,11 @@
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
  */
-#define cpu_need_resched(ci, flags)    \
-       do { ci->ci_want_resched = 1; aston(); } while (/* CONSTCOND */0)
+#define        cpu_need_resched(ci,flags)      do {    \
+       __USE(flags);                           \
+       ci->ci_want_resched = 1;                \
+       aston();                                \
+} while (/*CONSTCOND*/0)
 
 /*
  * Give a profiling tick to the current process when the user profiling
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/next68k/include/cpu.h
--- a/sys/arch/next68k/include/cpu.h    Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/next68k/include/cpu.h    Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.46 2012/02/02 16:59:43 tsutsui Exp $ */
+/*     $NetBSD: cpu.h,v 1.47 2013/10/19 19:20:59 christos Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -90,8 +90,11 @@
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
  */
-#define        cpu_need_resched(ci, flags)     \
-       do { ci->ci_want_resched = 1; aston(); } while (/* CONSTCOND */0)
+#define        cpu_need_resched(ci,flags)      do {    \
+       __USE(flags);                           \
+       ci->ci_want_resched = 1;                \
+       aston();                                \
+} while (/*CONSTCOND*/0)
 
 /*
  * Give a profiling tick to the current process when the user profiling
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/sh3/include/cpu.h
--- a/sys/arch/sh3/include/cpu.h        Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/sh3/include/cpu.h        Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.55 2010/12/22 03:22:43 nisimura Exp $        */
+/*     $NetBSD: cpu.h,v 1.56 2013/10/19 19:20:59 christos Exp $        */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
@@ -101,6 +101,7 @@
  */
 #define        cpu_need_resched(ci, flags)                                     \
 do {                                                                   \
+       __USE(flags);                                                   \
        ci->ci_want_resched = 1;                                        \
        if (curlwp != ci->ci_data.cpu_idlelwp)                          \
                aston(curlwp);                                          \
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/sparc/include/cpu.h
--- a/sys/arch/sparc/include/cpu.h      Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/sparc/include/cpu.h      Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.94 2012/05/01 09:40:15 martin Exp $ */
+/*     $NetBSD: cpu.h,v 1.95 2013/10/19 19:20:59 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -118,6 +118,7 @@
  * user mode, or after the current trap/syscall if in system mode.
  */
 #define cpu_need_resched(ci, flags) do {                               \
+       __USE(flags);                                                   \
        (ci)->ci_want_resched = 1;                                      \
        (ci)->ci_want_ast = 1;                                          \
                                                                        \
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/sun68k/include/cpu.h
--- a/sys/arch/sun68k/include/cpu.h     Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/sun68k/include/cpu.h     Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.22 2010/12/22 02:42:29 matt Exp $    */
+/*     $NetBSD: cpu.h,v 1.23 2013/10/19 19:20:59 christos Exp $        */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -132,8 +132,11 @@
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
  */
-#define        cpu_need_resched(ci, flags)     \
-       do { ci->ci_want_resched = 1; aston(); } while (/* CONSTCOND */0)
+#define        cpu_need_resched(ci,flags)      do {    \
+       __USE(flags);                           \
+       ci->ci_want_resched = 1;                \
+       aston();                                \
+} while (/*CONSTCOND*/0)
 
 /*
  * Give a profiling tick to the current process when the user profiling
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/vax/include/cpu.h
--- a/sys/arch/vax/include/cpu.h        Sat Oct 19 19:20:50 2013 +0000
+++ b/sys/arch/vax/include/cpu.h        Sat Oct 19 19:20:59 2013 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: cpu.h,v 1.95 2012/10/27 17:18:13 chs Exp $      */
+/*      $NetBSD: cpu.h,v 1.96 2013/10/19 19:21:00 christos Exp $      */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden
@@ -158,6 +158,7 @@
 #define        cpu_number()            (curcpu()->ci_cpuid)
 #define        cpu_need_resched(ci, flags)             \
        do {                                    \
+               __USE(flags);                   \
                (ci)->ci_want_resched = 1;      \
                mtpr(AST_OK,PR_ASTLVL);         \
        } while (/*CONSTCOND*/ 0)
diff -r 1e092c7d4231 -r 9bd742c5a8a5 sys/arch/x68k/include/cpu.h



Home | Main Index | Thread Index | Old Index