Date: Wed, 6 Jun 2018 15:10:12 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334715 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <201806061510.w56FACOr056160@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <johalun0@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806061510.w56FACOr056160>