/*------------------------------------------------------------------------*/ void USBGetEvents(void) { inc_jiffies(1); do_all_timers(); hub_thread_handler(NULL); handle_irqs(-1); }
void wswan_state::set_irq_line(int irq) { if (m_ws_portram[0xb2] & irq) { m_ws_portram[0xb6] |= irq; handle_irqs(); } }
/*------------------------------------------------------------------------*/ void my_wait_for_completion(struct completion *x) { int n=100; // printk("wait for completion\n"); while(!x->done && (n>0)) { do_all_timers(); #ifndef HAVE_IRQS handle_irqs(-1); #endif wait_ms(10); n--; } // printk("wait for completion done %i\n",x->done); }
/* wait until woken up (only one wait allowed!) */ int my_schedule_timeout(int x) { int wait=1; x+=10; // safety // printk("schedule_timeout %i\n",x); while(x>0) { do_all_timers(); #ifndef HAVE_IRQS handle_irqs(-1); #endif if (need_wakeup) break; wait_ms(wait); inc_jiffies(wait); x-=wait; } need_wakeup=0; // printk("schedule DONE!!!!!!\n"); return x; }
void wswan_state::clear_irq_line(int irq) { m_ws_portram[0xb6] &= ~irq; handle_irqs(); }