5 inline void initdsmlocks(volatile unsigned int *addr) {
6 (*addr) = RW_LOCK_BIAS;
10 int write_trylock(volatile unsigned int *lock) {
12 __asm__ __volatile__("xchgl %0,%1"
14 : "m"(*__xg(lock)), "0"(retval)
20 void write_unlock(volatile unsigned int *lock) {
21 __asm __volatile__("movl $1, %0" : "+m" (*__xg(lock))::"memory");