Implement the might_sleep_if() function macro in the LinuxKPI.

Submitted by:	Johannes Lundberg <johalun0@gmail.com>
MFC after:	1 week
Sponsored by:	Mellanox Technologies
Sponsored by:	Limelight Networks
This commit is contained in:
Hans Petter Selasky 2018-06-06 15:10:11 +00:00
parent ab98f1e8d8
commit 7e95e98db8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334715

View File

@ -47,6 +47,10 @@
#define might_sleep() \
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "might_sleep()")
#define might_sleep_if(cond) do { \
if (cond) { might_sleep(); } \
} while (0)
struct wait_queue;
struct wait_queue_head;