From: Rusty Russell <rusty@rustcorp.com.au>
To: Jamie Lokier <lk@tantalophile.demon.co.uk>
Cc: rth@twiddle.net, linux-kernel@vger.kernel.org
Subject: Re: per-cpu data...
Date: Thu, 25 Jul 2002 10:28:13 +1000 [thread overview]
Message-ID: <20020725004020.7D20644FB@lists.samba.org> (raw)
In-Reply-To: Your message of "Wed, 24 Jul 2002 13:31:29 +0100." <20020724133128.A7192@kushida.apsleyroad.org>
In message <20020724133128.A7192@kushida.apsleyroad.org> you write:
> Rusty Russell wrote:
> > (From my reading, ## on "int x" and "__per_cpu" is well-defined).
>
> DECLARE_PER_CPU (int x[3]);
>
> doesn't work, although you can always do
>
> typedef int three_ints_t[3];
> DECLARE_PER_CPU (three_ints_t x);
>
> I encountered the same thing while doing a user-space
> `MAKE_THREAD_SPECIFIC' macro. The solution I went for looks like this:
>
> #define DECLARE_PER_CPU(type, name) \
> __attribute__ ((__section (".percpu"))) __typeof__ (type) name##__per_cpu
Hmmm.... Yeah, might as well go the whole way.
Thanks!
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next prev parent reply other threads:[~2002-07-25 0:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-12 6:01 per-cpu data Rusty Russell
2002-07-12 8:21 ` Richard Henderson
2002-07-24 12:31 ` Jamie Lokier
2002-07-25 0:28 ` Rusty Russell [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-30 6:00 PER-CPU data Rajasekhar Pulluru
2012-03-30 6:35 ` Dave Hylands
2012-03-30 6:54 ` Srivatsa S. Bhat
2012-04-04 5:10 ` Rajasekhar Pulluru
2012-03-30 6:54 ` Srivatsa S. Bhat
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=20020725004020.7D20644FB@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=lk@tantalophile.demon.co.uk \
--cc=rth@twiddle.net \
/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.