All of lore.kernel.org
 help / color / mirror / Atom feed
From: andyliu <liudeyan@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, akpm@osdl.org
Subject: [PATCH]add an ifdef in sched.c
Date: Fri, 5 Nov 2004 20:02:00 +0800	[thread overview]
Message-ID: <aad1205e04110504023d53ce65@mail.gmail.com> (raw)

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

             reply	other threads:[~2004-11-05 12:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-05 12:02 andyliu [this message]
2004-11-05 12:06 ` [PATCH]add an ifdef in sched.c Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aad1205e04110504023d53ce65@mail.gmail.com \
    --to=liudeyan@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.