From: Nishanth Aravamudan <nacc@us.ibm.com>
To: robert.olsson@its.uu.se
Cc: netdev@oss.sgi.com, kernel-janitors@lists.osdl.org
Subject: [KJ] [PATCH 28/34] net/pktgen: replace interruptible_sleep_on_timeout() with wait_event_timeout()
Date: Tue, 25 Jan 2005 16:35:20 -0800 [thread overview]
Message-ID: <20050126003520.GT12649@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]
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.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.11-rc2-kj-v/net/core/pktgen.c 2005-01-24 09:34:21.000000000 -0800
+++ 2.6.11-rc2-kj/net/core/pktgen.c 2005-01-24 17:18:52.000000000 -0800
@@ -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 */
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
reply other threads:[~2005-01-26 0:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050126003520.GT12649@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=kernel-janitors@lists.osdl.org \
--cc=netdev@oss.sgi.com \
--cc=robert.olsson@its.uu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).