svn commit: r330398 - head/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Sun Mar 4 19:07:11 UTC 2018
Author: hselasky
Date: Sun Mar 4 19:07:10 2018
New Revision: 330398
URL: https://svnweb.freebsd.org/changeset/base/330398
Log:
Implement wait_event_lock_irq() macro function in the LinuxKPI.
MFC after: 1 week
Requested by: Johannes Lundberg <johalun0 at gmail.com>
Sponsored by: Mellanox Technologies
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 Sun Mar 4 18:58:24 2018 (r330397)
+++ head/sys/compat/linuxkpi/common/include/linux/wait.h Sun Mar 4 19:07:10 2018 (r330398)
@@ -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
More information about the svn-src-all
mailing list