From f81a7efad89b56fa1782995b1527ba831e1a2057 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 25 Oct 2006 13:58:30 +0100 Subject: PV-to-HVM: Impletement compatibility version of schedule_timeout_interruptible for kernels before 2.6.14 Signed-off-by: Ian Campbell Signed-off-by: K. Y. Srinivasan Signed-off-by: Tsunehisa Doi --- .../linux-2.6/compat-include/xen/platform-compat.h | 4 ++++ unmodified_drivers/linux-2.6/platform-pci/platform-compat.c | 9 +++++++++ 2 files changed, 13 insertions(+) (limited to 'unmodified_drivers') diff --git a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h index 1026f97653..6c08dad47d 100644 --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h @@ -37,4 +37,8 @@ unsigned long vmalloc_to_pfn(void *addr); unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout); #endif +#if defined(_LINUX_SCHED_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) +signed long schedule_timeout_interruptible(signed long timeout); +#endif + #endif diff --git a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c index 2df38d806b..f7c8db7fcd 100644 --- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c @@ -88,3 +88,12 @@ fastcall NORET_TYPE void do_exit(long code) } EXPORT_SYMBOL_GPL(do_exit); #endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) +signed long schedule_timeout_interruptible(signed long timeout) +{ + __set_current_state(TASK_INTERRUPTIBLE); + return schedule_timeout(timeout); +} +EXPORT_SYMBOL(schedule_timeout_interruptible); +#endif -- cgit v1.2.3