lkml.org 
[lkml]   [2006]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 00/05] robust per_cpu allocation for modules
On Sun, Apr 16, 2006 at 09:40:04AM -0400, Steven Rostedt wrote:

> The per_cpu variables are defined with the macro
> DEFINE_PER_CPU(type, var)
>
> This macro just places the variable into the section .data.percpu and
> prepends the prefix "per_cpu__" to the variable.
>
> To use this variable in another .c file the declaration is used by the
> macro
> DECLARE_PER_CPU(type, var)
>
> This macro is simply the extern declaration of the variable with the
> prefix added.
Suprisingly this macro shows up in ~19 .c files. Only valid usage is
forward declaration of a later static definition with DEFINE_PER_CPU.
arch/m32r/kernel/smp.c + arch/m32r/kernel/smpboot.c is jsut one example.

Just a random comment not related to Steven's patches.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-16 16:07    [W:0.083 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site