Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2018 16:30:51 +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: r330862 - stable/11/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201803131630.w2DGUpSP009559@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Mar 13 16:30:51 2018
New Revision: 330862
URL: https://svnweb.freebsd.org/changeset/base/330862

Log:
  MFC r330398:
  Implement wait_event_lock_irq() macro function in the LinuxKPI.
  
  Requested by:	Johannes Lundberg <johalun0@gmail.com>
  Sponsored by:	Mellanox Technologies

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	Tue Mar 13 16:30:01 2018	(r330861)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/wait.h	Tue Mar 13 16:30:51 2018	(r330862)
@@ -194,11 +194,19 @@ int linux_wait_event_common(wait_queue_head_t *, wait_
 })
 
 /*
- * Hold the (locked) spinlock when testing the cond.
+ * The passed spinlock is held when testing the condition.
  */
 #define	wait_event_interruptible_lock_irq(wqh, cond, lock) ({		\
 	__wait_event_common(wqh, cond, MAX_SCHEDULE_TIMEOUT,		\
 	    TASK_INTERRUPTIBLE, &(lock));				\
+})
+
+/*
+ * The passed spinlock is held when testing the condition.
+ */
+#define	wait_event_lock_irq(wqh, cond, lock) ({			\
+	__wait_event_common(wqh, cond, MAX_SCHEDULE_TIMEOUT,	\
+	    TASK_UNINTERRUPTIBLE, &(lock));			\
 })
 
 static inline void



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