atomic_t: unify all arch definitions

The atomic_t type cannot currently be used in some header files because it
would create an include loop with asm/atomic.h.  Move the type definition
to linux/types.h to break the loop.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Matthew Wilcox
2009-01-06 14:40:39 -08:00
committed by Linus Torvalds
parent f99ebf0a86
commit ea43546750
23 changed files with 33 additions and 104 deletions

View File

@ -5,7 +5,7 @@
* PowerPC atomic operations
*/
typedef struct { int counter; } atomic_t;
#include <linux/types.h>
#ifdef __KERNEL__
#include <linux/compiler.h>
@ -251,8 +251,6 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
#ifdef __powerpc64__
typedef struct { long counter; } atomic64_t;
#define ATOMIC64_INIT(i) { (i) }
static __inline__ long atomic64_read(const atomic64_t *v)