tree 228dbf79b2a79387c12f9b34622d70f84d88c72a
parent d0feafbf14ebe860136b8ad84cce42b34defb323
author Nishanth Aravamudan <[EMAIL PROTECTED]> Sat, 09 Jul 2005 07:10:00 -0700
committer Tony Luck <[EMAIL PROTECTED]> Tue, 12 Jul 2005 00:26:40 -0700

[IA64] use msleep_interruptible() instead of schedule_timeout

Description: Replace schedule_timeout() with msleep_interruptible() to
guarantee the task delays as expected.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Acked-by: Dean Nelson <[EMAIL PROTECTED]>
Signed-off-by: Tony Luck <[EMAIL PROTECTED]>

 arch/ia64/sn/kernel/xpc_main.c |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -53,6 +53,7 @@
 #include <linux/cache.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 #include <asm/sn/intr.h>
 #include <asm/sn/sn_sal.h>
 #include <asm/uaccess.h>
@@ -308,8 +309,7 @@ xpc_make_first_contact(struct xpc_partit
                        "partition %d\n", XPC_PARTID(part));
 
                /* wait a 1/4 of a second or so */
-               set_current_state(TASK_INTERRUPTIBLE);
-               (void) schedule_timeout(0.25 * HZ);
+               msleep_interruptible(250);
 
                if (part->act_state == XPC_P_DEACTIVATING) {
                        return part->reason;
@@ -841,9 +841,7 @@ xpc_do_exit(void)
        down(&xpc_discovery_exited);
 
 
-       set_current_state(TASK_INTERRUPTIBLE);
-       schedule_timeout(0.3 * HZ);
-       set_current_state(TASK_RUNNING);
+       msleep_interruptible(300);
 
 
        /* wait for all partitions to become inactive */
@@ -860,12 +858,8 @@ xpc_do_exit(void)
                        }
                }
 
-               if (active_part_count) {
-                       set_current_state(TASK_INTERRUPTIBLE);
-                       schedule_timeout(0.3 * HZ);
-                       set_current_state(TASK_RUNNING);
-               }
-
+               if (active_part_count)
+                       msleep_interruptible(300);
        } while (active_part_count > 0);
 
 
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to