aboutsummaryrefslogtreecommitdiff
path: root/include/asm-x86/local_64.h
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-01-30 13:31:26 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:31:26 +0100
commit4ad02718345783a3b84bae1895917666b779850d (patch)
treeffeb70f577b394a042f5816afd0de081560b98e6 /include/asm-x86/local_64.h
parentfe758fb1192790f8e465a7f59efe47ca73717d3e (diff)
x86: clean up local_{32|64}.h
Common prefix from both files moved to local.h Change __inline__ to inline Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/local_64.h')
-rw-r--r--include/asm-x86/local_64.h25
1 files changed, 6 insertions, 19 deletions
diff --git a/include/asm-x86/local_64.h b/include/asm-x86/local_64.h
index e87492bb069..92330f8135f 100644
--- a/include/asm-x86/local_64.h
+++ b/include/asm-x86/local_64.h
@@ -1,19 +1,6 @@
#ifndef _ARCH_X8664_LOCAL_H
#define _ARCH_X8664_LOCAL_H
-#include <linux/percpu.h>
-#include <asm/atomic.h>
-
-typedef struct
-{
- atomic_long_t a;
-} local_t;
-
-#define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) }
-
-#define local_read(l) atomic_long_read(&(l)->a)
-#define local_set(l,i) atomic_long_set(&(l)->a, (i))
-
static inline void local_inc(local_t *l)
{
__asm__ __volatile__(
@@ -55,7 +42,7 @@ static inline void local_sub(long i, local_t *l)
* true if the result is zero, or false for all
* other cases.
*/
-static __inline__ int local_sub_and_test(long i, local_t *l)
+static inline int local_sub_and_test(long i, local_t *l)
{
unsigned char c;
@@ -74,7 +61,7 @@ static __inline__ int local_sub_and_test(long i, local_t *l)
* returns true if the result is 0, or false for all other
* cases.
*/
-static __inline__ int local_dec_and_test(local_t *l)
+static inline int local_dec_and_test(local_t *l)
{
unsigned char c;
@@ -93,7 +80,7 @@ static __inline__ int local_dec_and_test(local_t *l)
* and returns true if the result is zero, or false for all
* other cases.
*/
-static __inline__ int local_inc_and_test(local_t *l)
+static inline int local_inc_and_test(local_t *l)
{
unsigned char c;
@@ -113,7 +100,7 @@ static __inline__ int local_inc_and_test(local_t *l)
* if the result is negative, or false when
* result is greater than or equal to zero.
*/
-static __inline__ int local_add_negative(long i, local_t *l)
+static inline int local_add_negative(long i, local_t *l)
{
unsigned char c;
@@ -131,7 +118,7 @@ static __inline__ int local_add_negative(long i, local_t *l)
*
* Atomically adds @i to @l and returns @i + @l
*/
-static __inline__ long local_add_return(long i, local_t *l)
+static inline long local_add_return(long i, local_t *l)
{
long __i = i;
__asm__ __volatile__(
@@ -141,7 +128,7 @@ static __inline__ long local_add_return(long i, local_t *l)
return i + __i;
}
-static __inline__ long local_sub_return(long i, local_t *l)
+static inline long local_sub_return(long i, local_t *l)
{
return local_add_return(-i,l);
}