Module Name:    src
Committed By:   riastradh
Date:           Sun Dec 19 11:35:36 UTC 2021

Modified Files:
        src/sys/external/bsd/common/include/linux: kernel.h

Log Message:
linux: might_sleep_if


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/external/bsd/common/include/linux/kernel.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/common/include/linux/kernel.h
diff -u src/sys/external/bsd/common/include/linux/kernel.h:1.43 src/sys/external/bsd/common/include/linux/kernel.h:1.44
--- src/sys/external/bsd/common/include/linux/kernel.h:1.43	Sun Dec 19 11:33:49 2021
+++ src/sys/external/bsd/common/include/linux/kernel.h	Sun Dec 19 11:35:36 2021
@@ -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
 

Reply via email to