From: Dipankar Sarma <dipankar@in.ibm.com>
To: "Perez-Gonzalez, Inaky" <inaky.perez-gonzalez@intel.com>
Cc: "'lkml (linux-kernel@vger.kernel.org)'" <linux-kernel@vger.kernel.org>
Subject: Re: How to initialize complex per-cpu variables?
Date: Fri, 6 Jun 2003 18:28:07 +0530 [thread overview]
Message-ID: <20030606125807.GA2561@in.ibm.com> (raw)
In-Reply-To: <A46BBDB345A7D5118EC90002A5072C780D6F13E8@orsmsx116.jf.intel.com>
On Thu, Jun 05, 2003 at 09:35:37PM +0000, Perez-Gonzalez, Inaky wrote:
> Now the question is: how do I walk each structure that is
> associated to each CPU - I mean, something like:
>
> struct rtf_h *h;
> for_each_cpu (h, rtf_lh) {
> rtf_h_init (h);
> }
One way to do this would be to do -
for (i = 0; i < NR_CPUS; i++) {
if (cpu_possible(i))
rtf_h_init(&per_cpu(rtf_lh, i));
}
However you might want to actually use the CPU notifiers to do this. See
rcu_init() in kernel/rcupdate.c.
Thanks
Dipankar
next prev parent reply other threads:[~2003-06-06 12:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-05 21:32 How to initialize complex per-cpu variables? Perez-Gonzalez, Inaky
2003-06-06 12:58 ` Dipankar Sarma [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-06-05 22:01 Perez-Gonzalez, Inaky
2003-06-06 20:44 Perez-Gonzalez, Inaky
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=20030606125807.GA2561@in.ibm.com \
--to=dipankar@in.ibm.com \
--cc=inaky.perez-gonzalez@intel.com \
--cc=linux-kernel@vger.kernel.org \
/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.