[lkml]   [2010]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] delay.h: add __must_check to msleep_interruptible
Code calling msleep_interruptible() must be aware that sleep time might be
shorter than intended as a result of a signal being caught. Code not checking
the return value of msleep_interruptible() is probably buggy, unless it's doing
the signal_pending() check itself, which is redundant.

Cc: Andrew Morton <>
Signed-off-by: Baruch Siach <>
include/linux/delay.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/delay.h b/include/linux/delay.h
index a6ecb34..1be4994 100644
--- a/include/linux/delay.h
+++ b/include/linux/delay.h
@@ -44,7 +44,7 @@ static inline void ndelay(unsigned long x)
extern unsigned long lpj_fine;
void calibrate_delay(void);
void msleep(unsigned int msecs);
-unsigned long msleep_interruptible(unsigned int msecs);
+unsigned long __must_check msleep_interruptible(unsigned int msecs);
void usleep_range(unsigned long min, unsigned long max);

static inline void ssleep(unsigned int seconds)

 \ /
  Last update: 2010-11-04 09:59    [W:0.050 / U:0.440 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site