From 2843afb42cdb9ee84895b35ce29b1a4950f52184 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Thu, 26 Aug 2010 00:18:46 +0800 Subject: [PATCH] b=13752 Remove 2.4 kernel definition of cfs_waitq_wait_event_interruptible_timeout() i=issac --- lnet/include/libcfs/linux/linux-prim.h | 46 ---------------------------------- 1 file changed, 46 deletions(-) diff --git a/lnet/include/libcfs/linux/linux-prim.h b/lnet/include/libcfs/linux/linux-prim.h index 5b53307..e1bf763 100644 --- a/lnet/include/libcfs/linux/linux-prim.h +++ b/lnet/include/libcfs/linux/linux-prim.h @@ -304,53 +304,7 @@ do { \ #define cfs_waitq_wait_event_timeout wait_event_timeout #endif -#ifndef wait_event_interruptible_timeout /* Only for RHEL3 2.4.21 kernel */ -#define __wait_event_interruptible_timeout(wq, condition, timeout, ret) \ -do { \ - int __ret = 0; \ - if (!(condition)) { \ - wait_queue_t __wait; \ - unsigned long expire; \ - \ - init_waitqueue_entry(&__wait, current); \ - expire = timeout + jiffies; \ - add_wait_queue(&wq, &__wait); \ - for (;;) { \ - set_current_state(TASK_INTERRUPTIBLE); \ - if (condition) \ - break; \ - if (jiffies > expire) { \ - ret = jiffies - expire; \ - break; \ - } \ - if (!signal_pending(current)) { \ - schedule_timeout(timeout); \ - continue; \ - } \ - ret = -ERESTARTSYS; \ - break; \ - } \ - current->state = TASK_RUNNING; \ - remove_wait_queue(&wq, &__wait); \ - } \ -} while (0) - -/* - retval == 0; condition met; we're good. - retval < 0; interrupted by signal. - retval > 0; timed out. -*/ -#define cfs_waitq_wait_event_interruptible_timeout(wq, condition, timeout) \ -({ \ - int __ret = 0; \ - if (!(condition)) \ - __wait_event_interruptible_timeout(wq, condition, \ - timeout, __ret); \ - __ret; \ -}) -#else #define cfs_waitq_wait_event_interruptible_timeout wait_event_interruptible_timeout -#endif #define cfs_wait_event_interruptible_exclusive(wq, condition, rc) \ ({ \ -- 1.8.3.1