Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23840
b: refs/heads/master
c: 9494943
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Mar 25, 2006
1 parent 5ccca28 commit 5cc2ae3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d05f4de414c98348219b633401ad9c9a5348a8b
refs/heads/master: 94949436191f69dac735919a9698612ef6b3dbba
10 changes: 5 additions & 5 deletions trunk/include/asm-x86_64/local.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

typedef struct
{
volatile unsigned int counter;
volatile unsigned long counter;
} local_t;

#define LOCAL_INIT(i) { (i) }
Expand All @@ -16,31 +16,31 @@ typedef struct
static __inline__ void local_inc(local_t *v)
{
__asm__ __volatile__(
"incl %0"
"incq %0"
:"=m" (v->counter)
:"m" (v->counter));
}

static __inline__ void local_dec(local_t *v)
{
__asm__ __volatile__(
"decl %0"
"decq %0"
:"=m" (v->counter)
:"m" (v->counter));
}

static __inline__ void local_add(unsigned int i, local_t *v)
{
__asm__ __volatile__(
"addl %1,%0"
"addq %1,%0"
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
}

static __inline__ void local_sub(unsigned int i, local_t *v)
{
__asm__ __volatile__(
"subl %1,%0"
"subq %1,%0"
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
}
Expand Down

0 comments on commit 5cc2ae3

Please sign in to comment.