From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [RFC: 2.6 patch] kernel/sched.c: remove two unused functions
Date: Fri, 13 May 2005 02:47:16 +0200 [thread overview]
Message-ID: <20050513004716.GR3603@stusta.de> (raw)
This patch removes the unused functions wait_for_completion_timeout and
wait_for_completion_interruptible_timeout.
Is any usage for them planned or is this patch OK?
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 7 May 2005
include/linux/completion.h | 4 --
kernel/sched.c | 66 -------------------------------------
2 files changed, 70 deletions(-)
--- linux-2.6.12-rc3-mm2-full/include/linux/completion.h.old 2005-05-03 07:52:14.000000000 +0200
+++ linux-2.6.12-rc3-mm2-full/include/linux/completion.h 2005-05-03 07:52:32.000000000 +0200
@@ -29,10 +29,6 @@
extern void FASTCALL(wait_for_completion(struct completion *));
extern int FASTCALL(wait_for_completion_interruptible(struct completion *x));
-extern unsigned long FASTCALL(wait_for_completion_timeout(struct completion *x,
- unsigned long timeout));
-extern unsigned long FASTCALL(wait_for_completion_interruptible_timeout(
- struct completion *x, unsigned long timeout));
extern void FASTCALL(complete(struct completion *));
extern void FASTCALL(complete_all(struct completion *));
--- linux-2.6.12-rc3-mm2-full/kernel/sched.c.old 2005-05-03 07:52:42.000000000 +0200
+++ linux-2.6.12-rc3-mm2-full/kernel/sched.c 2005-05-03 07:53:03.000000000 +0200
@@ -3146,36 +3146,6 @@
}
EXPORT_SYMBOL(wait_for_completion);
-unsigned long fastcall __sched
-wait_for_completion_timeout(struct completion *x, unsigned long timeout)
-{
- might_sleep();
-
- spin_lock_irq(&x->wait.lock);
- if (!x->done) {
- DECLARE_WAITQUEUE(wait, current);
-
- wait.flags |= WQ_FLAG_EXCLUSIVE;
- __add_wait_queue_tail(&x->wait, &wait);
- do {
- __set_current_state(TASK_UNINTERRUPTIBLE);
- spin_unlock_irq(&x->wait.lock);
- timeout = schedule_timeout(timeout);
- spin_lock_irq(&x->wait.lock);
- if (!timeout) {
- __remove_wait_queue(&x->wait, &wait);
- goto out;
- }
- } while (!x->done);
- __remove_wait_queue(&x->wait, &wait);
- }
- x->done--;
-out:
- spin_unlock_irq(&x->wait.lock);
- return timeout;
-}
-EXPORT_SYMBOL(wait_for_completion_timeout);
-
int fastcall __sched wait_for_completion_interruptible(struct completion *x)
{
int ret = 0;
@@ -3209,42 +3179,6 @@
}
EXPORT_SYMBOL(wait_for_completion_interruptible);
-unsigned long fastcall __sched
-wait_for_completion_interruptible_timeout(struct completion *x,
- unsigned long timeout)
-{
- might_sleep();
-
- spin_lock_irq(&x->wait.lock);
- if (!x->done) {
- DECLARE_WAITQUEUE(wait, current);
-
- wait.flags |= WQ_FLAG_EXCLUSIVE;
- __add_wait_queue_tail(&x->wait, &wait);
- do {
- if (signal_pending(current)) {
- timeout = -ERESTARTSYS;
- __remove_wait_queue(&x->wait, &wait);
- goto out;
- }
- __set_current_state(TASK_INTERRUPTIBLE);
- spin_unlock_irq(&x->wait.lock);
- timeout = schedule_timeout(timeout);
- spin_lock_irq(&x->wait.lock);
- if (!timeout) {
- __remove_wait_queue(&x->wait, &wait);
- goto out;
- }
- } while (!x->done);
- __remove_wait_queue(&x->wait, &wait);
- }
- x->done--;
-out:
- spin_unlock_irq(&x->wait.lock);
- return timeout;
-}
-EXPORT_SYMBOL(wait_for_completion_interruptible_timeout);
-
#define SLEEP_ON_VAR \
unsigned long flags; \
next reply other threads:[~2005-05-13 0:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-13 0:47 Adrian Bunk [this message]
2005-05-13 6:48 ` Ingo Molnar
2005-05-14 5:35 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2005-05-06 22:20 Adrian Bunk
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=20050513004716.GR3603@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome