From: Arnd Bergmann <arnd@arndb.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] deprecate sleep_on()
Date: Sat, 13 Nov 2004 17:41:02 +0100 [thread overview]
Message-ID: <200411131741.06415.arnd@arndb.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 3497 bytes --]
The use of sleep_on() and related functions has been discouraged
since before 2.4.0. Marking the calls deprecated hopefully
helps us phasing out the few remaining users. With this patch
we get eight new warnings in i386 defconfig, most of which
are about code that looks suspicious.
With i386 allmodconfig, I get new warnings in a total of 81 files,
mostly obscure device drivers.
===== include/linux/wait.h 1.27 vs edited =====
--- 1.27/include/linux/wait.h Tue Oct 19 11:40:20 2004
+++ edited/include/linux/wait.h Sun Nov 7 16:26:13 2004
@@ -304,12 +304,35 @@
* They are racy. DO NOT use them, use the wait_event* interfaces above.
* We plan to remove these interfaces during 2.7.
*/
-extern void FASTCALL(sleep_on(wait_queue_head_t *q));
-extern long FASTCALL(sleep_on_timeout(wait_queue_head_t *q,
- signed long timeout));
-extern void FASTCALL(interruptible_sleep_on(wait_queue_head_t *q));
-extern long FASTCALL(interruptible_sleep_on_timeout(wait_queue_head_t *q,
- signed long timeout));
+void FASTCALL(__sleep_on(wait_queue_head_t *q));
+long FASTCALL(__sleep_on_timeout(wait_queue_head_t *q, signed long timeout));
+void FASTCALL(__interruptible_sleep_on(wait_queue_head_t *q));
+long FASTCALL(__interruptible_sleep_on_timeout(wait_queue_head_t *q,
+ signed long timeout));
+
+static inline void __deprecated
+sleep_on(wait_queue_head_t *q)
+{
+ return __sleep_on(q);
+}
+
+static inline long __deprecated
+sleep_on_timeout(wait_queue_head_t *q, signed long timeout)
+{
+ return __sleep_on_timeout(q, timeout);
+}
+
+static inline void __deprecated
+interruptible_sleep_on(wait_queue_head_t *q)
+{
+ return __interruptible_sleep_on(q);
+}
+
+static inline long __deprecated
+interruptible_sleep_on_timeout(wait_queue_head_t *q, signed long timeout)
+{
+ return __interruptible_sleep_on_timeout(q, timeout);
+}
/*
* Waitqueues which are removed from the waitqueue_head at wakeup time
===== kernel/sched.c 1.377 vs edited =====
--- 1.377/kernel/sched.c Sun Oct 31 17:38:43 2004
+++ edited/kernel/sched.c Sun Nov 7 16:28:40 2004
@@ -2867,7 +2867,7 @@
__remove_wait_queue(q, &wait); \
spin_unlock_irqrestore(&q->lock, flags);
-void fastcall __sched interruptible_sleep_on(wait_queue_head_t *q)
+void fastcall __sched __interruptible_sleep_on(wait_queue_head_t *q)
{
SLEEP_ON_VAR
@@ -2878,9 +2878,10 @@
SLEEP_ON_TAIL
}
-EXPORT_SYMBOL(interruptible_sleep_on);
+EXPORT_SYMBOL(__interruptible_sleep_on);
-long fastcall __sched interruptible_sleep_on_timeout(wait_queue_head_t *q, long timeout)
+long fastcall __sched
+__interruptible_sleep_on_timeout(wait_queue_head_t *q, long timeout)
{
SLEEP_ON_VAR
@@ -2893,9 +2894,9 @@
return timeout;
}
-EXPORT_SYMBOL(interruptible_sleep_on_timeout);
+EXPORT_SYMBOL(__interruptible_sleep_on_timeout);
-void fastcall __sched sleep_on(wait_queue_head_t *q)
+void fastcall __sched __sleep_on(wait_queue_head_t *q)
{
SLEEP_ON_VAR
@@ -2906,9 +2907,9 @@
SLEEP_ON_TAIL
}
-EXPORT_SYMBOL(sleep_on);
+EXPORT_SYMBOL(__sleep_on);
-long fastcall __sched sleep_on_timeout(wait_queue_head_t *q, long timeout)
+long fastcall __sched __sleep_on_timeout(wait_queue_head_t *q, long timeout)
{
SLEEP_ON_VAR
@@ -2921,7 +2922,7 @@
return timeout;
}
-EXPORT_SYMBOL(sleep_on_timeout);
+EXPORT_SYMBOL(__sleep_on_timeout);
void set_user_nice(task_t *p, long nice)
{
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
reply other threads:[~2004-11-13 17:45 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=200411131741.06415.arnd@arndb.de \
--to=arnd@arndb.de \
--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