Go to the documentation of this file.
38 #ifndef _LINUX_RWSEM_H
39 #error "please don't include asm/rwsem.h directly, use linux/rwsem.h instead"
43 #define RWSEM_UNLOCKED_VALUE 0x00000000
44 #define RWSEM_ACTIVE_BIAS 0x00000001
45 #define RWSEM_ACTIVE_MASK 0x0000ffff
46 #define RWSEM_WAITING_BIAS (-0x00010000)
48 #define RWSEM_UNLOCKED_VALUE 0x0000000000000000L
49 #define RWSEM_ACTIVE_BIAS 0x0000000000000001L
50 #define RWSEM_ACTIVE_MASK 0x00000000ffffffffL
51 #define RWSEM_WAITING_BIAS (-0x0000000100000000L)
53 #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
54 #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
77 :
"=&d" (old),
"=&d" (
new),
"=Q" (sem->
count)
109 :
"=&d" (old),
"=&d" (
new),
"=Q" (sem->
count)
112 return old >= 0 ? 1 : 0;
120 signed long old,
new,
tmp;
137 :
"=&d" (old),
"=&d" (
new),
"=Q" (sem->
count)
171 :
"=&d" (old),
"=Q" (sem->
count)
182 signed long old,
new;
198 :
"=&d" (old),
"=&d" (
new),
"=Q" (sem->
count)
211 signed long old,
new,
tmp;
228 :
"=&d" (old),
"=&d" (
new),
"=Q" (sem->
count)
241 signed long old,
new,
tmp;
258 :
"=&d" (old),
"=&d" (
new),
"=Q" (sem->
count)
270 signed long old,
new;
286 :
"=&d" (old),
"=&d" (
new),
"=Q" (sem->
count)
296 signed long old,
new;
312 :
"=&d" (old),
"=&d" (
new),
"=Q" (sem->
count)