aboutsummaryrefslogtreecommitdiffstats
path: root/xen
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2003-09-19 17:28:31 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2003-09-19 17:28:31 +0000
commit7377511a1607ebc1ef9f6131e42f78bcf0cc1602 (patch)
treed0cbb929eb70941b61b5e750c3af901f85359143 /xen
parenta8d24cb14783b291adcae3c593c73562b42b84eb (diff)
downloadxen-7377511a1607ebc1ef9f6131e42f78bcf0cc1602.tar.gz
xen-7377511a1607ebc1ef9f6131e42f78bcf0cc1602.tar.bz2
xen-7377511a1607ebc1ef9f6131e42f78bcf0cc1602.zip
bitkeeper revision 1.445 (3f6b3cbfPoEFlaJ9_8AHKqhfHOuhyQ)
e100.h, schedule.c: Yet another e100/schedule_timeout fix.
Diffstat (limited to 'xen')
-rw-r--r--xen/common/schedule.c37
-rw-r--r--xen/drivers/net/e100/e100.h4
2 files changed, 14 insertions, 27 deletions
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 616598a7a3..c17efab8aa 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -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;
diff --git a/xen/drivers/net/e100/e100.h b/xen/drivers/net/e100/e100.h
index 456d2c7ec8..75b73a024d 100644
--- a/xen/drivers/net/e100/e100.h
+++ b/xen/drivers/net/e100/e100.h
@@ -62,6 +62,10 @@
#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.