Skip to contentSkip to conversation

net/pktgen: replace interruptible_sleep_on_timeout() with wait_event_timeout()

PATCH New Nishanth Aravamudan 1 participant 1 message Jan 26, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 28/34 net/pktgen: replace interruptible_sleep_on_timeout() with wait_event_timeout()

Hi,

Please consider applying.

Description: Use wait_event_timeout() instead of the deprecated interruptible_sleep_on_timeout(). Current code does not check for signals, so interruptible seems unnecessary. Patch is compile-tested.

net/core/pktgen.c +2 -2
@@ -135,6 +135,7 @@
 #include <linux/ipv6.h>
 #include <linux/udp.h>
 #include <linux/proc_fs.h>
+#include <linux/wait.h>
 #include <net/checksum.h>
 #include <net/ipv6.h>
 #include <net/addrconf.h>
@@ -3118,8 +3119,7 @@ static void __exit pg_cleanup(void)
                 struct pktgen_thread *t = pktgen_threads;
                 pktgen_threads->control |= (T_TERMINATE);
 
-                while( t == pktgen_threads) 
-                        interruptible_sleep_on_timeout(&queue, HZ);
+		wait_event_timeout(queue, (t != pktgen_threads), HZ);
         }
 
         /* Un-register us from receiving netdevice events */

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors