rwlock_reader_lock: fix lock list jammed up

This commit is contained in:
Tomoki Shirasawa
2016-03-03 22:47:48 +09:00
parent 8ebb3a4231
commit 26c0180374
2 changed files with 44 additions and 31 deletions

View File

@ -202,4 +202,17 @@ static inline unsigned long atomic_cmpxchg8(unsigned long *addr,
return oldval;
}
static inline unsigned long atomic_cmpxchg4(unsigned int *addr,
unsigned int oldval,
unsigned int newval)
{
asm volatile("lock; cmpxchgl %2, %1\n"
: "=a" (oldval), "+m" (*addr)
: "r" (newval), "0" (oldval)
: "memory"
);
return oldval;
}
#endif