4 #define RW_LOCK_BIAS 0x01000000
5 #define atomic_read(v) (*v)
6 #define RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
7 //#define LOCK_PREFIX ""
9 ".section .smp_locks,\"a\"\n" \
11 " .long 661f\n" /* address */\
21 void initdsmlocks(volatile unsigned int *addr);
22 void readLock(volatile unsigned int *addr);
23 void writeLock(volatile unsigned int *addr);
24 int read_trylock(volatile unsigned int *lock);
25 int write_trylock(volatile unsigned int *lock);
26 void atomic_dec(volatile unsigned int *v);
27 void atomic_inc(volatile unsigned int *v);
28 static void atomic_add(int i, atomic_t *v);
29 static int atomic_sub_and_test(int i, atomic_t *v);
30 void read_unlock(volatile unsigned int *rw);
31 void write_unlock(volatile unsigned int *rw);