Changeset 679 for GPL/trunk/include/linux/wait.h
- Timestamp:
- Mar 18, 2021, 8:57:36 PM (4 years ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-linux-3.2.102 (added) merged: 611-614 /GPL/branches/uniaud32-next (added) merged: 615-678
- Property svn:mergeinfo changed
-
GPL/trunk/include/linux/wait.h
r32 r679 12 12 13 13 #include <linux/spinlock.h> 14 #include <linux/list.h> 15 #include <asm/page.h> 14 16 15 #include <asm/page.h> 17 typedef struct wait_queue_entry wait_queue_entry_t; 18 19 typedef int (*wait_queue_func_t)(struct wait_queue_entry *wq_entry, unsigned mode, int flags, void *key); 20 21 /* 22 * A single wait-queue entry structure: 23 */ 24 struct wait_queue_entry { 25 unsigned int flags; 26 void *private; 27 wait_queue_func_t func; 28 struct list_head entry; 29 }; 16 30 17 31 /* … … 30 44 }; 31 45 typedef struct __wait_queue wait_queue_t; 46 47 struct __wait_queue_head { 48 spinlock_t lock; 49 struct list_head task_list; 50 }; 51 52 struct wait_queue_head { 53 spinlock_t lock; 54 struct list_head head; 55 }; 56 typedef struct wait_queue_head wait_queue_head_t; 32 57 33 58 /* … … 65 90 #endif 66 91 67 struct __wait_queue_head {68 void * lock;69 void * task_list;70 #if WAITQUEUE_DEBUG71 long __magic;72 long __creator;73 #endif74 };75 typedef struct __wait_queue_head wait_queue_head_t;76 77 92 #if WAITQUEUE_DEBUG 78 93 # define __WAITQUEUE_DEBUG_INIT(name) \ … … 91 106 92 107 #define __WAIT_QUEUE_HEAD_INITIALIZER(name) \ 93 { WAITQUEUE_RW_LOCK_UNLOCKED, { &(name). task_list, &(name).task_list} \108 { WAITQUEUE_RW_LOCK_UNLOCKED, { &(name).head, &(name).head } \ 94 109 __WAITQUEUE_HEAD_DEBUG_INIT(name)} 95 110 … … 99 114 void init_waitqueue_head(wait_queue_head_t *q); 100 115 101 void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p); 116 extern void init_waitqueue_entry(struct wait_queue_entry *wq_entry, struct task_struct *p); 117 extern void add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); 118 extern void add_wait_queue_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); 119 extern void remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); 102 120 103 121 int waitqueue_active(wait_queue_head_t *q); … … 110 128 void __add_wait_queue_tail(wait_queue_head_t *head, wait_queue_t *new); 111 129 void __remove_wait_queue(wait_queue_head_t *head, wait_queue_t *old); 112 130 void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr); 113 131 #endif /* __KERNEL__ */ 114 132 #define wait_event_lock_irq(wq_head, condition, lock) 133 #define wake_up_all(x) 115 134 #endif
Note:
See TracChangeset
for help on using the changeset viewer.