Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11454
b: refs/heads/master
c: 3efc333
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala authored and Paul Mackerras committed Sep 25, 2005
1 parent 3124c6c commit 867e64a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: b671ad2befe37131af380183760862d5cbad858d
refs/heads/master: 3efc333e7fdb6fab9d4eae129e2b249c6483b250
8 changes: 4 additions & 4 deletions trunk/include/asm-ppc/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* (the type definitions are in asm/raw_spinlock_types.h)
*/

#define __raw_spin_is_locked(x) ((x)->lock != 0)
#define __raw_spin_is_locked(x) ((x)->slock != 0)
#define __raw_spin_unlock_wait(lock) \
do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0)
#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
Expand All @@ -31,17 +31,17 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
bne- 2b\n\
isync"
: "=&r"(tmp)
: "r"(&lock->lock), "r"(1)
: "r"(&lock->slock), "r"(1)
: "cr0", "memory");
}

static inline void __raw_spin_unlock(raw_spinlock_t *lock)
{
__asm__ __volatile__("eieio # __raw_spin_unlock": : :"memory");
lock->lock = 0;
lock->slock = 0;
}

#define __raw_spin_trylock(l) (!test_and_set_bit(0,&(l)->lock))
#define __raw_spin_trylock(l) (!test_and_set_bit(0,(volatile unsigned long *)(&(l)->slock)))

/*
* Read-write spinlocks, allowing multiple readers
Expand Down

0 comments on commit 867e64a

Please sign in to comment.