Date: Sun, 4 Mar 2018 19:07:10 +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: r330398 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <201803041907.w24J7ALe012603@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803041907.w24J7ALe012603>