git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
include
/
asm-x86_64
/
local.h
diff --git
a/include/asm-x86_64/local.h
b/include/asm-x86_64/local.h
index
cd17945
..
3e72c41
100644
(file)
--- a/
include/asm-x86_64/local.h
+++ b/
include/asm-x86_64/local.h
@@
-5,7
+5,7
@@
typedef struct
{
typedef struct
{
- volatile
long
counter;
+ volatile
unsigned int
counter;
} local_t;
#define LOCAL_INIT(i) { (i) }
} local_t;
#define LOCAL_INIT(i) { (i) }
@@
-13,34
+13,34
@@
typedef struct
#define local_read(v) ((v)->counter)
#define local_set(v,i) (((v)->counter) = (i))
#define local_read(v) ((v)->counter)
#define local_set(v,i) (((v)->counter) = (i))
-static
inline
void local_inc(local_t *v)
+static
__inline__
void local_inc(local_t *v)
{
__asm__ __volatile__(
{
__asm__ __volatile__(
- "inc
q
%0"
+ "inc
l
%0"
:"=m" (v->counter)
:"m" (v->counter));
}
:"=m" (v->counter)
:"m" (v->counter));
}
-static
inline
void local_dec(local_t *v)
+static
__inline__
void local_dec(local_t *v)
{
__asm__ __volatile__(
{
__asm__ __volatile__(
- "dec
q
%0"
+ "dec
l
%0"
:"=m" (v->counter)
:"m" (v->counter));
}
:"=m" (v->counter)
:"m" (v->counter));
}
-static
inline void local_add(long
i, local_t *v)
+static
__inline__ void local_add(unsigned int
i, local_t *v)
{
__asm__ __volatile__(
{
__asm__ __volatile__(
- "add
q
%1,%0"
+ "add
l
%1,%0"
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
}
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
}
-static
inline void local_sub(long
i, local_t *v)
+static
__inline__ void local_sub(unsigned int
i, local_t *v)
{
__asm__ __volatile__(
{
__asm__ __volatile__(
- "sub
q
%1,%0"
+ "sub
l
%1,%0"
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
}
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
}