From: adilger Date: Mon, 10 Nov 2003 16:01:27 +0000 (+0000) Subject: Despite Zach's assurances, it seems that conditional_schedule() is a X-Git-Tag: v1_7_0_51~2^9~185 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3391092323ee64de425377666a9826151af90251;p=fs%2Flustre-release.git Despite Zach's assurances, it seems that conditional_schedule() is a low-latency RHism, so define a compat macro for non-RH systems. b=2227 --- diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index eee732f..fdd1abf 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -73,6 +73,11 @@ static inline void lustre_daemonize_helper(void) current->signal->tty = NULL; } +#define rb_node_s rb_node +#define rb_root_s rb_root +typedef struct rb_root_s rb_root_t; +typedef struct rb_node_s rb_node_t; + #else /* 2.4.. */ #define ll_vfs_create(a,b,c,d) vfs_create(a,b,c) @@ -136,14 +141,11 @@ static inline void lustre_daemonize_helper(void) current->tty = NULL; } -#endif /* end of 2.4 compat macros */ - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -#define rb_node_s rb_node -#define rb_root_s rb_root -typedef struct rb_root_s rb_root_t; -typedef struct rb_node_s rb_node_t; +#ifndef conditional_schedule +#define conditional_schedule() if (unlikely(need_resched())) schedule() #endif +#endif /* end of 2.4 compat macros */ + #endif /* __KERNEL__ */ #endif /* _COMPAT25_H */