aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/sched.h
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2018-01-31 13:40:36 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2018-01-31 13:40:36 +0000
commitcb57d1dd305d9c360f436681b61e9b457947d4d8 (patch)
tree0c5f20e3be4beb25d59ae7579dd0db63f8a15180 /sys/compat/linuxkpi/common/include/linux/sched.h
parent6a8b7aa424356fdd25df88e9b1a192b2d143f4fa (diff)
downloadsrc-cb57d1dd305d9c360f436681b61e9b457947d4d8.tar.gz
src-cb57d1dd305d9c360f436681b61e9b457947d4d8.zip
Properly implement the cond_resched() function macro in the LinuxKPI.
MFC after: 1 week Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=328623
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/sched.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h
index 9d5bca717b4d..817e16cb22c7 100644
--- a/sys/compat/linuxkpi/common/include/linux/sched.h
+++ b/sys/compat/linuxkpi/common/include/linux/sched.h
@@ -110,7 +110,7 @@ put_task_struct(struct task_struct *task)
linux_free_current(task);
}
-#define cond_resched() if (!cold) sched_relinquish(curthread)
+#define cond_resched() do { if (!cold) sched_relinquish(curthread); } while (0)
#define yield() kern_yield(PRI_UNCHANGED)
#define sched_yield() sched_relinquish(curthread)