From: hselasky Date: Mon, 19 Oct 2015 10:57:56 +0000 (+0000) Subject: Merge LinuxKPI changes from DragonflyBSD: X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c58bf9145bf400f6f98e6f221d2f329099acb120;p=people%2Fjulieng%2Ffreebsd.git Merge LinuxKPI changes from DragonflyBSD: - Implement schedule_timeout(). Sponsored by: Mellanox Technologies --- diff --git a/sys/ofed/include/linux/sched.h b/sys/ofed/include/linux/sched.h index da25359456fe..c2fb8dfd1418 100644 --- a/sys/ofed/include/linux/sched.h +++ b/sys/ofed/include/linux/sched.h @@ -107,4 +107,15 @@ do { \ #define sched_yield() sched_relinquish(curthread) +static inline long +schedule_timeout(signed long timeout) +{ + if (timeout < 0) + return 0; + + pause("lstim", timeout); + + return 0; +} + #endif /* _LINUX_SCHED_H_ */