diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2002-08-12 20:27:49 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-08-12 20:27:49 -0700 |
| commit | a2314817f1e46d6596a5f86d8f7cd1def5e7846d (patch) | |
| tree | 402a20644aa4af03fa8263d0e04bf856d56c7599 /kernel | |
| parent | 466e44bb94c10842f9e34b4692e01bd7210c2a89 (diff) | |
[PATCH] DECLARE_PER_CPU/DEFINE_PER_CPU patch
This old __per_cpu_data define wasn't enough if an arch wants to
use the gcc __thread prefix (thread local storage), which needs to
go *before* the type in the definition. So we have to go for a
DECLARE macro, and while we're there, separate DECLARE and DEFINE,
as definitions of per-cpu data cannot live in modules. This also
means that accidental direct references to per-cpu variables will
be caught at compile time.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/softirq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index c5089c2cd2c9..4405e83aaf21 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -151,8 +151,8 @@ struct tasklet_head /* Some compilers disobey section attribute on statics when not initialized -- RR */ -static struct tasklet_head tasklet_vec __per_cpu_data = { NULL }; -static struct tasklet_head tasklet_hi_vec __per_cpu_data = { NULL }; +static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec) = { NULL }; +static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec) = { NULL }; void __tasklet_schedule(struct tasklet_struct *t) { |
