@@ -142,23 +142,27 @@ static void pfault_interrupt(struct ext_code ext_code,
142142 if (subcode & PF_COMPLETE ) {
143143 /* signal bit is set -> a page has been swapped in by VM */
144144 if (tsk -> thread .pfault_wait == 1 ) {
145- /* Initial interrupt was faster than the completion
145+ /*
146+ * Initial interrupt was faster than the completion
146147 * interrupt. pfault_wait is valid. Set pfault_wait
147148 * back to zero and wake up the process. This can
148149 * safely be done because the task is still sleeping
149- * and can't produce new pfaults. */
150+ * and can't produce new pfaults.
151+ */
150152 tsk -> thread .pfault_wait = 0 ;
151153 list_del (& tsk -> thread .list );
152154 wake_up_process (tsk );
153155 put_task_struct (tsk );
154156 } else {
155- /* Completion interrupt was faster than initial
157+ /*
158+ * Completion interrupt was faster than initial
156159 * interrupt. Set pfault_wait to -1 so the initial
157160 * interrupt doesn't put the task to sleep.
158161 * If the task is not running, ignore the completion
159162 * interrupt since it must be a leftover of a PFAULT
160163 * CANCEL operation which didn't remove all pending
161- * completion interrupts. */
164+ * completion interrupts.
165+ */
162166 if (task_is_running (tsk ))
163167 tsk -> thread .pfault_wait = -1 ;
164168 }
@@ -170,23 +174,29 @@ static void pfault_interrupt(struct ext_code ext_code,
170174 /* Already on the list with a reference: put to sleep */
171175 goto block ;
172176 } else if (tsk -> thread .pfault_wait == -1 ) {
173- /* Completion interrupt was faster than the initial
177+ /*
178+ * Completion interrupt was faster than the initial
174179 * interrupt (pfault_wait == -1). Set pfault_wait
175- * back to zero and exit. */
180+ * back to zero and exit.
181+ */
176182 tsk -> thread .pfault_wait = 0 ;
177183 } else {
178- /* Initial interrupt arrived before completion
184+ /*
185+ * Initial interrupt arrived before completion
179186 * interrupt. Let the task sleep.
180187 * An extra task reference is needed since a different
181188 * cpu may set the task state to TASK_RUNNING again
182- * before the scheduler is reached. */
189+ * before the scheduler is reached.
190+ */
183191 get_task_struct (tsk );
184192 tsk -> thread .pfault_wait = 1 ;
185193 list_add (& tsk -> thread .list , & pfault_list );
186194block :
187- /* Since this must be a userspace fault, there
195+ /*
196+ * Since this must be a userspace fault, there
188197 * is no kernel task state to trample. Rely on the
189- * return to userspace schedule() to block. */
198+ * return to userspace schedule() to block.
199+ */
190200 __set_current_state (TASK_UNINTERRUPTIBLE );
191201 set_tsk_need_resched (tsk );
192202 set_preempt_need_resched ();
0 commit comments