Author: hselasky
Date: Wed Jun  6 15:10:11 2018
New Revision: 334715
URL: https://svnweb.freebsd.org/changeset/base/334715

Log:
  Implement the might_sleep_if() function macro in the LinuxKPI.
  
  Submitted by: Johannes Lundberg <johal...@gmail.com>
  MFC after:    1 week
  Sponsored by: Mellanox Technologies
  Sponsored by: Limelight Networks

Modified:
  head/sys/compat/linuxkpi/common/include/linux/wait.h

Modified: head/sys/compat/linuxkpi/common/include/linux/wait.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/wait.h        Wed Jun  6 
15:06:21 2018        (r334714)
+++ head/sys/compat/linuxkpi/common/include/linux/wait.h        Wed Jun  6 
15:10:11 2018        (r334715)
@@ -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;
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to