Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2018 06:49:27 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r335425 - stable/11/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201806200649.w5K6nROe026469@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Jun 20 06:49:26 2018
New Revision: 335425
URL: https://svnweb.freebsd.org/changeset/base/335425

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

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/wait.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/wait.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/wait.h	Wed Jun 20 06:48:41 2018	(r335424)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h	Wed Jun 20 06:49:26 2018	(r335425)
@@ -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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806200649.w5K6nROe026469>