From: Jamie Lokier <lk@tantalophile.demon.co.uk>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: rth@twiddle.net, linux-kernel@vger.kernel.org
Subject: Re: per-cpu data...
Date: Wed, 24 Jul 2002 13:31:29 +0100 [thread overview]
Message-ID: <20020724133128.A7192@kushida.apsleyroad.org> (raw)
In-Reply-To: <20020712062058.25F21415D@lists.samba.org>; from rusty@rustcorp.com.au on Fri, Jul 12, 2002 at 04:01:52PM +1000
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
enjoy,
-- Jamie
next prev parent reply other threads:[~2002-07-24 12:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-12 6:01 Rusty Russell
2002-07-12 8:21 ` Richard Henderson
2002-07-24 12:31 ` Jamie Lokier [this message]
2002-07-25 0:28 ` Rusty Russell
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=20020724133128.A7192@kushida.apsleyroad.org \
--to=lk@tantalophile.demon.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@twiddle.net \
--cc=rusty@rustcorp.com.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®