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

From: Ingo Molnar
Date: Mon Oct 06 2008 - 01:00:50 EST



* 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_def.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>
> ---
>
> include/asm-x86/atomic_32.h | 10 +---------
> include/asm-x86/atomic_64.h | 10 +---------
> include/asm-x86/atomic_def.h | 13 +++++++++++++

nice cleanup!

One small request: could you please use the standard naming convention
please and rename it to atomic_types.h?

That moves it in line with existing data type files: kvm_types.h,
mm_types.h, posix_types.h, spinlock_types.h, amd_iommu_types.h,
kmap_types.h, etc.

Easiest is to do it via:

sed -i 's/atomic_def.h/atomic_types.h/g' patches/separate-atomic.patch

Reviewed-by: Ingo Molnar <mingo@xxxxxxx>

Thanks,

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/