Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36175
b: refs/heads/master
c: 85f6517
h: refs/heads/master
i:
  36173: 2bc3550
  36171: 04e00f4
  36167: 7e5451f
  36159: 4864c29
v: v3
  • Loading branch information
Hirokazu Takata authored and Linus Torvalds committed Sep 27, 2006
1 parent 5c47718 commit 96efe71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: a27f3113322edff36743014cc9e752a21ffc0324
refs/heads/master: 85f651794c46e8e3faf204a767d1caa7f9f278f0
9 changes: 8 additions & 1 deletion trunk/include/asm-m32r/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,14 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
);
}

#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
static inline int __raw_read_trylock(raw_rwlock_t *lock)
{
atomic_t *count = (atomic_t*)lock;
if (atomic_dec_return(count) >= 0)
return 1;
atomic_inc(count);
return 0;
}

static inline int __raw_write_trylock(raw_rwlock_t *lock)
{
Expand Down

0 comments on commit 96efe71

Please sign in to comment.