From: Frank Mori Hess Date: Sat, 5 Feb 2005 15:22:01 +0000 (+0000) Subject: fix for need_resched from Ian Abbott : X-Git-Tag: r0_7_70~57 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7c26bec93231c5837afdc0654a123bf78731e5c6;p=comedi.git fix for need_resched from Ian Abbott : This patch alters the Comedi driver's linux/sched.h compatibility header to move the need_resched function after the #include_next directive. This is because the 'current' task variable is not defined until after the real linux/sched.h is included. I've also removed the comment - "/* not sure exactly when need_resched() was added */"; I've checked, and it was added in 2.4.20 as the code stated. I thought I'd fix the incorrect comment at the top of the file while I was at it. --- diff --git a/include/linux/sched.h b/include/linux/sched.h index 5e040ddc..65631334 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1,5 +1,5 @@ /* - * linux/fs.h compatibility header + * linux/sched.h compatibility header */ #ifndef __COMPAT_LINUX_SCHED_H_ @@ -11,14 +11,14 @@ #define signal_pending(x) (((x)->signal) & (~(x)->blocked)) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20) /* not sure exactly when need_resched() was added */ +#include_next + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20) static inline int need_resched(void) { return current->need_resched; } #endif -#include_next - #endif