bitkeeper revision 1.445 (3f6b3cbfPoEFlaJ9_8AHKqhfHOuhyQ)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 19 Sep 2003 17:28:31 +0000 (17:28 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 19 Sep 2003 17:28:31 +0000 (17:28 +0000)
e100.h, schedule.c:
  Yet another e100/schedule_timeout fix.

xen/common/schedule.c
xen/drivers/net/e100/e100.h

index 616598a7a3664e9a91a38eb5f6be10300e9b6939..c17efab8aa2735419e3c2666298a7b9ac7fa44da 100644 (file)
@@ -648,33 +648,16 @@ long schedule_timeout(long timeout)
     
     expire = timeout + jiffies;
     
-    if ( is_idle_task(current) )
-    {
-        /*
-         * If the idle task is calling in then it shouldn't ever sleep. We 
-         * therefore force it to TASK_RUNNING here and busy-wait. We spin on 
-         * schedule to give other domains a chance meanwhile.
-         */
-        set_current_state(TASK_RUNNING);
-        do { 
-            schedule();
-            timeout = expire - jiffies;
-        } 
-        while ( (timeout > 0) && is_idle_task(current) );
-    }
-    else
-    {
-        init_timer(&timer);
-        timer.expires = expire;
-        timer.data = (unsigned long) current;
-        timer.function = process_timeout;
-        
-        add_timer(&timer);
-        schedule();
-        del_timer_sync(&timer);
-        
-        timeout = expire - jiffies;
-    }
+    init_timer(&timer);
+    timer.expires = expire;
+    timer.data = (unsigned long) current;
+    timer.function = process_timeout;
+    
+    add_timer(&timer);
+    schedule();
+    del_timer_sync(&timer);
+    
+    timeout = expire - jiffies;
 
  out:
     return timeout < 0 ? 0 : timeout;
index 456d2c7ec8d2a56bd4ceb5143ee94494b7a7cc0d..75b73a024dfb50d0f1bceea52f659b3d15e38d05 100644 (file)
 
 #define yield() ((void)0)
 
+#define schedule_timeout(_t)       \
+  set_current_state(TASK_RUNNING); \
+  mdelay((_t)*(1000/HZ))
+
 #define E100_REGS_LEN 1
 /*
  *  Configure parameters for buffers per controller.