Re: [PATCH -mm -v5] Separate atomic_t declaration from asm/atomic.h into asm/atomic_def.h




* Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

On Wed, 08 Oct 2008 17:44:30 +0800
Huang Ying <ying.huang@xxxxxxxxx> wrote:

From: Huang Ying <ying.huang@xxxxxxxxx>

asm/atomic.h contains both declaration and implementation of atomic_t. So
there are some implementation related files included in asm/atomic.h. And
atomic_t is a typedef. Combination of above makes it impossible to use
atomic_t in files included by atomic.h. Such as atomic_t can not be used
in linux/kernel.h on i386, because it is included by asm/atomic.h.

It is reasonable to separate declaration from implementation. So a new
file atomic_types.h is added for every architecture to accommodate the
declaration of atomic_t.

Includes fixes from Andrew Moton.

Signed-off-by: Huang Ying <ying.huang@xxxxxxxxx>
Reviewed-by: Ingo Molnar <mingo@xxxxxxx>

The difference between what-i-currently-have and what-you-just-sent is
below. It's quite large.

Can you explain this update please?

i've been giving review feedback to make it all fit into existing
namespace concepts better. Should have no change in functionality. (But
i have not tested it)

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



Relevant Pages

  • Re: incorrect warning?
    ... before the typedef for show, ... typedef void (struct thingTag *); ... Since there's been no complete declaration of that type, ... such an incomplete type would be completed later. ...
    (comp.lang.c)
  • Re: how to define a function pointer variable witout typdef?
    ... I have N869 and it makes no reference to typedef reserving ... A /definition/ of an identifier is a declaration for that ...
    (comp.lang.c)
  • Re: typedef function pointer
    ... the semantics for typedef is: ... That's the syntax, not the semantics. ... to be an array of 20 ints, the declaration is ... to a function taking to int arguments and returning it, ...
    (comp.lang.c)
  • Re: Porting from visual C to gcc problem
    ... >The declaration above defines the identifier 'DNIS_TIMER_CALLBACK' as ... the compiler must have come across the typedef ... >C is a scoped language, and one of the scopes is "prototype scope". ... >int func; ...
    (comp.lang.c.moderated)
  • Re: typedef with function pointers
    ... Forget about the typedef for a moment, ... you say "*x is an int, hence x is a pointer to int." ... the other elements of the declaration depends on the way ... and function pointers got answered. ...
    (comp.lang.c)