Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79800
b: refs/heads/master
c: a33fff3
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent 0fc58bf commit a9e3cfa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 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: 2fed0c507cf0101d511366f36e8573f403dbfea5
refs/heads/master: a33fff3a033f2e8a930067ad608c21e1f86bffab
2 changes: 1 addition & 1 deletion trunk/include/asm-x86/spinlock_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)

static inline void __raw_spin_unlock(raw_spinlock_t *lock)
{
asm volatile("movb $1,%0" : "+m" (lock->slock) :: "memory");
asm volatile("movb $1,%0" : "=m" (lock->slock) :: "memory");
}

#else
Expand Down
10 changes: 5 additions & 5 deletions trunk/include/asm-x86/spinlock_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
"jle 3b\n\t"
"jmp 1b\n"
"2:\t"
: "=m" (lock->slock) : : "memory");
: "+m" (lock->slock) : : "memory");
}

/*
Expand Down Expand Up @@ -80,7 +80,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)

asm volatile(
"xchgl %0,%1"
:"=q" (oldval), "=m" (lock->slock)
:"=q" (oldval), "+m" (lock->slock)
:"0" (0) : "memory");

return oldval > 0;
Expand Down Expand Up @@ -162,13 +162,13 @@ static inline int __raw_write_trylock(raw_rwlock_t *lock)

static inline void __raw_read_unlock(raw_rwlock_t *rw)
{
asm volatile(LOCK_PREFIX "incl %0" :"=m" (rw->lock) : : "memory");
asm volatile(LOCK_PREFIX "incl %0" :"+m" (rw->lock) : : "memory");
}

static inline void __raw_write_unlock(raw_rwlock_t *rw)
{
asm volatile(LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ",%0"
: "=m" (rw->lock) : : "memory");
asm volatile(LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ", %0"
: "+m" (rw->lock) : : "memory");
}

#define _raw_spin_relax(lock) cpu_relax()
Expand Down

0 comments on commit a9e3cfa

Please sign in to comment.