public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] delay.h: add __must_check to msleep_interruptible
@ 2010-11-04  8:55 Baruch Siach
  2010-12-16  6:17 ` Baruch Siach
  2010-12-17 23:49 ` Andrew Morton
  0 siblings, 2 replies; 5+ messages in thread
From: Baruch Siach @ 2010-11-04  8:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Baruch Siach, Andrew Morton

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 <akpm@linux-foundation.org>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 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)
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-17 23:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-04  8:55 [PATCH] delay.h: add __must_check to msleep_interruptible Baruch Siach
2010-12-16  6:17 ` Baruch Siach
2010-12-16  8:20   ` Andrew Morton
2010-12-17 23:49 ` Andrew Morton
2010-12-17 23:55   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox