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;
#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.