svn commit: r328655 - stable/11/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Thu Feb 1 13:10:59 UTC 2018


Author: hselasky
Date: Thu Feb  1 13:10:58 2018
New Revision: 328655
URL: https://svnweb.freebsd.org/changeset/base/328655

Log:
  MFC r328623:
  Properly implement the cond_resched() function macro in the LinuxKPI.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/sched.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/sched.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/sched.h	Thu Feb  1 13:04:01 2018	(r328654)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/sched.h	Thu Feb  1 13:10:58 2018	(r328655)
@@ -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)


More information about the svn-src-all mailing list