From: yangsheng Date: Fri, 13 Aug 2010 13:12:44 +0000 (+0400) Subject: b=13752 Remove 2.4 kernel definition of cfs_waitq_wait_event_interruptible_timeout(). X-Git-Tag: 2.0.51.0~84 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=990817ae223af5a32904b44f05216c387be3fc58;p=fs%2Flustre-release.git b=13752 Remove 2.4 kernel definition of cfs_waitq_wait_event_interruptible_timeout(). i=issac --- diff --git a/libcfs/include/libcfs/linux/linux-prim.h b/libcfs/include/libcfs/linux/linux-prim.h index b4612ad..078b541 100644 --- a/libcfs/include/libcfs/linux/linux-prim.h +++ b/libcfs/include/libcfs/linux/linux-prim.h @@ -279,53 +279,8 @@ do { \ ret = wait_event_timeout(wq, condition, 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, ret)\ -do { \ - ret = 0; \ - if (!(condition)) \ - __wait_event_interruptible_timeout(wq, condition, \ - timeout, ret); \ -} while (0) -#else #define cfs_waitq_wait_event_interruptible_timeout(wq, c, timeout, ret) \ ret = wait_event_interruptible_timeout(wq, c, timeout) -#endif /* * atomic