[PATCH]add an ifdef in sched.c

From: andyliu
Date: Fri Nov 05 2004 - 07:04:29 EST


hi

I have found that in sched.c. the macro for_each_domain only useful
for the config
that has CONFIG_SMP defined. so i add an ifdef in sched.c.

below is the patch

--- linux-2.6.10-rc1/kernel/sched.c 2004-10-23 05:40:05.000000000 +0800
+++ linux-2.6.10-rc1-new/kernel/sched.c 2004-11-04 16:34:55.000000000 +0800
@@ -281,8 +281,10 @@

static DEFINE_PER_CPU(struct runqueue, runqueues);

-#define for_each_domain(cpu, domain) \
+#ifdef CONFIG_SMP
+# define for_each_domain(cpu, domain) \
for (domain = cpu_rq(cpu)->sd; domain; domain = domain->parent)
+#endif

#define cpu_rq(cpu) (&per_cpu(runqueues, (cpu)))
#define this_rq() (&__get_cpu_var(runqueues))




thanks for reading.
--
Yours andyliu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/