7 #include <linux/sched.h>
9 #include <linux/export.h>
17 #ifdef CONFIG_DEBUG_LOCK_ALLOC
35 #define RWSEM_WAITING_FOR_READ 0x00000001
36 #define RWSEM_WAITING_FOR_WRITE 0x00000002
43 #define RWSEM_WAKE_ANY 0
44 #define RWSEM_WAKE_NO_ACTIVE 1
45 #define RWSEM_WAKE_READ_OWNED 2
63 signed long oldcount, woken, loop, adjustment;
145 for (loop = woken; loop > 0; loop--) {
147 next = waiter->
list.next;
152 put_task_struct(tsk);
166 goto try_again_write;
174 unsigned int flags,
signed long adjustment)