lkml.org 
[lkml]   [2013]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] timer: Add __sched to msleep() and msleep_interruptible()
From
Date
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;



\
 
 \ /
  Last update: 2013-11-11 09:21    [W:0.047 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site