patch-1.3.71 linux/include/linux/tqueue.h

Next file: linux/include/linux/un.h
Previous file: linux/include/linux/socket.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.70/linux/include/linux/tqueue.h linux/include/linux/tqueue.h
@@ -137,24 +137,20 @@
  */
 _INLINE_ void run_task_queue(task_queue *list)
 {
-	register struct tq_struct *save_p;
 	register struct tq_struct *p;
-	void *arg;
-	void (*f) (void *);
 
-	while(1) {
-		p = xchg(list,&tq_last);
-		if(p == &tq_last)
-			break;
+	p = xchg(list,&tq_last);
 
-		do {
-			arg    = p -> data;
-			f      = p -> routine;
-			save_p = p -> next;
-			p -> sync = 0;
-			(*f)(arg);
-			p = save_p;
-		} while(p != &tq_last);
+	while (p != &tq_last) {
+		void *arg;
+		void (*f) (void *);
+		register struct tq_struct *save_p;
+		arg    = p -> data;
+		f      = p -> routine;
+		save_p = p;
+		p      = p -> next;
+		save_p -> sync = 0;
+		(*f)(arg);
 	}
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this