mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Cc: Huang Ying <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f99ebf0a86
commit
ea43546750
23 changed files with 33 additions and 104 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef _ALPHA_ATOMIC_H
|
||||
#define _ALPHA_ATOMIC_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/barrier.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
|
|
@ -13,14 +14,6 @@
|
|||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Counter is volatile to make sure gcc doesn't try to be clever
|
||||
* and move things around on us. We need to use _exactly_ the address
|
||||
* the user gave us, not some alias that contains the same information.
|
||||
*/
|
||||
typedef struct { volatile int counter; } atomic_t;
|
||||
typedef struct { volatile long counter; } atomic64_t;
|
||||
|
||||
#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
|
||||
#define ATOMIC64_INIT(i) ( (atomic64_t) { (i) } )
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue