Wed May 27 01:35:28 2009 UTC ()
avoid a local variable in a do {} while (0) macro.


(mrg)
diff -r1.84 -r1.85 src/sys/arch/sparc/include/cpu.h

cvs diff -r1.84 -r1.85 src/sys/arch/sparc/include/cpu.h (expand / switch to unified diff)

--- src/sys/arch/sparc/include/cpu.h 2008/02/27 18:26:16 1.84
+++ src/sys/arch/sparc/include/cpu.h 2009/05/27 01:35:28 1.85
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cpu.h,v 1.84 2008/02/27 18:26:16 xtraeme Exp $ */ 1/* $NetBSD: cpu.h,v 1.85 2009/05/27 01:35:28 mrg Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1992, 1993 4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This software was developed by the Computer Systems Engineering group 7 * This software was developed by the Computer Systems Engineering group
8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
9 * contributed to Berkeley. 9 * contributed to Berkeley.
10 * 10 *
11 * All advertising materials mentioning features or use of this software 11 * All advertising materials mentioning features or use of this software
12 * must display the following acknowledgement: 12 * must display the following acknowledgement:
13 * This product includes software developed by the University of 13 * This product includes software developed by the University of
14 * California, Lawrence Berkeley Laboratory. 14 * California, Lawrence Berkeley Laboratory.
@@ -130,32 +130,31 @@ void sparc_softintr_init(void); @@ -130,32 +130,31 @@ void sparc_softintr_init(void);
130 130
131/* 131/*
132 * Give a profiling tick to the current process when the user profiling 132 * Give a profiling tick to the current process when the user profiling
133 * buffer pages are invalid. On the sparc, request an ast to send us 133 * buffer pages are invalid. On the sparc, request an ast to send us
134 * through trap(), marking the proc as needing a profiling tick. 134 * through trap(), marking the proc as needing a profiling tick.
135 */ 135 */
136#define cpu_need_proftick(l) ((l)->l_pflag |= LP_OWEUPC, cpuinfo.ci_want_ast = 1) 136#define cpu_need_proftick(l) ((l)->l_pflag |= LP_OWEUPC, cpuinfo.ci_want_ast = 1)
137 137
138/* 138/*
139 * Notify the current process (p) that it has a signal pending, 139 * Notify the current process (p) that it has a signal pending,
140 * process as soon as possible. 140 * process as soon as possible.
141 */ 141 */
142#define cpu_signotify(l) do { \ 142#define cpu_signotify(l) do { \
143 struct cpu_info *_ci = (l)->l_cpu; \ 143 (l)->l_cpu->ci_want_ast = 1; \
144 _ci->ci_want_ast = 1; \ 
145 \ 144 \
146 /* Just interrupt the target CPU, so it can notice its AST */ \ 145 /* Just interrupt the target CPU, so it can notice its AST */ \
147 if (_ci->ci_cpuid != cpu_number()) \ 146 if ((l)->l_cpu->ci_cpuid != cpu_number()) \
148 XCALL0(sparc_noop, 1U << _ci->ci_cpuid); \ 147 XCALL0(sparc_noop, 1U << (l)->l_cpu->ci_cpuid); \
149} while (/*CONSTCOND*/0) 148} while (/*CONSTCOND*/0)
150 149
151/* CPU architecture version */ 150/* CPU architecture version */
152extern int cpu_arch; 151extern int cpu_arch;
153 152
154/* Number of CPUs in the system */ 153/* Number of CPUs in the system */
155extern int sparc_ncpus; 154extern int sparc_ncpus;
156 155
157/* 156/*
158 * Interrupt handler chains. Interrupt handlers should return 0 for 157 * Interrupt handler chains. Interrupt handlers should return 0 for
159 * ``not me'' or 1 (``I took care of it''). intr_establish() inserts a 158 * ``not me'' or 1 (``I took care of it''). intr_establish() inserts a
160 * handler into the list. The handler is called with its (single) 159 * handler into the list. The handler is called with its (single)
161 * argument, or with a pointer to a clockframe if ih_arg is NULL. 160 * argument, or with a pointer to a clockframe if ih_arg is NULL.