stack or INT 13 emulator etc.
return seed;
}
-/**************************************************************************
-POLL INTERRUPTIONS
-**************************************************************************/
-void poll_interruptions(void)
-{
- int ch;
- if ( ! as_main_program ) return;
- /* If an interruption has occured restart etherboot */
- if (iskey() && (ch = getchar(), (ch == K_ESC) || (ch == K_EOF) || (ch == K_INTR))) {
- int state = (ch != K_INTR)? -1 : -3;
- longjmp(restart_etherboot, state);
- }
-}
-
/**************************************************************************
SLEEP
**************************************************************************/
unsigned long tmo;
for (tmo = currticks()+secs*TICKS_PER_SEC; currticks() < tmo; ) {
- poll_interruptions();
}
}
if (result == 0) {
/* We don't have anything */
- /* Check for abort key only if the Rx queue is empty -
- * as long as we have something to process, don't
- * assume that something failed. It is unlikely that
- * we have no processing time left between packets. */
- poll_interruptions();
/* Do the timeout after at least a full queue walk. */
if ((timeout == 0) || (currticks() > time)) {
break;
void sleepticks(int numticks ) {
u_int tmo;
for (tmo = currticks()+numticks; currticks() < tmo; ) {
- poll_interruptions();
}
return;
}
unsigned int i;
for(i = 0; i < msecs; i++) {
udelay(1000);
- poll_interruptions();
}
}
{
load_timer2(ticks);
while(timer2_running()) {
- poll_interruptions();
}
}
E1000_WRITE_REG (&hw, TDT, tx_tail);
while (!(txp->upper.data & E1000_TXD_STAT_DD)) {
udelay(10); /* give the nic a chance to write to the register */
- poll_interruptions();
}
DEBUGFUNC("send end");
}
while((tp->hw_status->idx[0].tx_consumer != entry) &&
(tp->hw_status->idx[0].tx_consumer != PREV_TX(entry))) {
mdelay(10); /* give the nick a chance */
- poll_interruptions();
if (++i > 500) { /* timeout 5s for transmit */
printf("transmit timed out\n");
tg3_halt(tp);
extern void twiddle P((void));
extern void sleep P((int secs));
extern void interruptible_sleep P((int secs));
-extern void poll_interruptions P((void));
extern int strcasecmp P((const char *a, const char *b));
extern char *substr P((const char *a, const char *b));