Changeset 625 for GPL/branches/uniaud32-next/lib32/waitqueue.c
- Timestamp:
- Jan 3, 2021, 7:20:20 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/lib32/waitqueue.c
r615 r625 109 109 spin_unlock_irqrestore(&x->wait.lock, flags); 110 110 } 111 /** 112 * complete_all: - signals all threads waiting on this completion 113 * @x: holds the state of this particular completion 114 * 115 * This will wake up all threads waiting on this particular completion event. 116 * 117 * If this function wakes up a task, it executes a full memory barrier before 118 * accessing the task state. 119 * 120 * Since complete_all() sets the completion of @x permanently to done 121 * to allow multiple waiters to finish, a call to reinit_completion() 122 * must be used on @x if @x is to be used again. The code must make 123 * sure that all waiters have woken and finished before reinitializing 124 * @x. Also note that the function completion_done() can not be used 125 * to know if there are still waiters after complete_all() has been called. 126 */ 127 void complete_all(struct completion *x) 128 { 129 unsigned long flags; 130 131 spin_lock_irqsave(&x->wait.lock, flags); 132 __wake_up_locked(&x->wait, TASK_NORMAL, 1); 133 spin_unlock_irqrestore(&x->wait.lock, flags); 134 } 111 135 //****************************************************************************** 112 136 //****************************************************************************** … … 115 139 dprintf3(("WARNING: __wake_up_locked STUB")); 116 140 } 141 //****************************************************************************** 142 //****************************************************************************** 143 /** 144 * wait_for_completion: - waits for completion of a task 145 * @x: holds the state of this particular completion 146 * 147 * This waits to be signaled for completion of a specific task. It is NOT 148 * interruptible and there is no timeout. 149 * 150 * See also similar routines (i.e. wait_for_completion_timeout()) with timeout 151 * and interrupt capability. Also see complete(). 152 */ 153 void wait_for_completion(struct completion *x) 154 { 155 dprintf3(("WARNING: wait_for_completion STUB")); 156 } 157 158 159 /** 160 * wait_for_completion_timeout: - waits for completion of a task (w/timeout) 161 * @x: holds the state of this particular completion 162 * @timeout: timeout value in jiffies 163 * 164 * This waits for either a completion of a specific task to be signaled or for a 165 * specified timeout to expire. The timeout is in jiffies. It is not 166 * interruptible. 167 * 168 * Return: 0 if timed out, and positive (at least 1, or number of jiffies left 169 * till timeout) if completed. 170 */ 171 unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout) 172 { 173 dprintf3(("WARNING: wait_for_completion_timeout STUB")); 174 return 1; 175 }
Note:
See TracChangeset
for help on using the changeset viewer.