Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/common/include/linux linux: might_sleep_if



details:   https://anonhg.NetBSD.org/src/rev/983cb4aef9a4
branches:  trunk
changeset: 1028649:983cb4aef9a4
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:35:36 2021 +0000

description:
linux: might_sleep_if

diffstat:

 sys/external/bsd/common/include/linux/kernel.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 91f97d49bb26 -r 983cb4aef9a4 sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h    Sun Dec 19 11:35:27 2021 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h    Sun Dec 19 11:35:36 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernel.h,v 1.43 2021/12/19 11:33:49 riastradh Exp $    */
+/*     $NetBSD: kernel.h,v 1.44 2021/12/19 11:35:36 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -63,6 +63,11 @@
 #define        IS_REACHABLE(option)    (option)
 
 #define        might_sleep     ASSERT_SLEEPABLE
+#define        might_sleep_if(C) do                                                  \
+{                                                                            \
+       if (C)                                                                \
+               might_sleep();                                                \
+} while (0)
 
 #define        DEFINE_STATIC_KEY_FALSE(N)      bool N __unused = false
 



Home | Main Index | Thread Index | Old Index