All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
To: linux-kernel@vger.kernel.org
Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	yrl.pp-manager.tt@hitachi.com
Subject: [PATCH] timer: Add __sched to msleep() and msleep_interruptible()
Date: Mon, 11 Nov 2013 17:18:15 +0900	[thread overview]
Message-ID: <20131111081815.20618.79098.stgit@yunodevel> (raw)

Add __sched to msleep() and msleep_interruptible() for avoiding to show
these functions in WCHAN. If a driver calls msleep() or msleep_interruptible()
in a lot of places, users cannot understand that the driver might sleep which
functions execute msleep() or msleep_interruptible(). So, by applying this
patch, users can confirm the function calling msleep() or msleep_interruptible()
from WCHAN.

Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
---
 kernel/timer.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index 6582b82..cc1470f 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1660,7 +1660,7 @@ void __init init_timers(void)
  * msleep - sleep safely even with waitqueue interruptions
  * @msecs: Time in milliseconds to sleep for
  */
-void msleep(unsigned int msecs)
+void __sched msleep(unsigned int msecs)
 {
 	unsigned long timeout = msecs_to_jiffies(msecs) + 1;
 
@@ -1674,7 +1674,7 @@ EXPORT_SYMBOL(msleep);
  * msleep_interruptible - sleep waiting for signals
  * @msecs: Time in milliseconds to sleep for
  */
-unsigned long msleep_interruptible(unsigned int msecs)
+unsigned long __sched msleep_interruptible(unsigned int msecs)
 {
 	unsigned long timeout = msecs_to_jiffies(msecs) + 1;
 


             reply	other threads:[~2013-11-11  8:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11  8:18 Yoshihiro YUNOMAE [this message]
2013-11-26  7:19 ` [PATCH] timer: Add __sched to msleep() and msleep_interruptible() Yoshihiro YUNOMAE

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=20131111081815.20618.79098.stgit@yunodevel \
    --to=yoshihiro.yunomae.ez@hitachi.com \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=tglx@linutronix.de \
    --cc=yrl.pp-manager.tt@hitachi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.