patch-2.4.14 linux/drivers/char/ip2/i2ellis.c
Next file: linux/drivers/char/ip2/i2ellis.h
Previous file: linux/drivers/char/ip2/i2cmd.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Wed Oct 24 12:05:18 2001
- Orig file:
v2.4.13/linux/drivers/char/ip2/i2ellis.c
- Orig date:
Mon Oct 16 12:58:51 2000
diff -u --recursive --new-file v2.4.13/linux/drivers/char/ip2/i2ellis.c linux/drivers/char/ip2/i2ellis.c
@@ -552,6 +552,9 @@
pB->i2eStartMail = iiGetMail(pB);
+ // Throw it away and clear the mailbox structure element
+ pB->i2eStartMail = NO_MAIL_HERE;
+
// Everything is ok now, return with good status/
pB->i2eValid = I2E_MAGIC;
@@ -592,14 +595,27 @@
static void
ii2DelayTimer(unsigned int mseconds)
{
+ wait_queue_t wait;
+
+ init_waitqueue_entry(&wait, current);
+
init_timer ( pDelayTimer );
+ add_wait_queue(&pDelayWait, &wait);
+
+ set_current_state( TASK_INTERRUPTIBLE );
+
pDelayTimer->expires = jiffies + ( mseconds + 9 ) / 10;
pDelayTimer->function = ii2DelayWakeup;
pDelayTimer->data = 0;
add_timer ( pDelayTimer );
- interruptible_sleep_on ( &pDelayWait );
+
+ schedule();
+
+ set_current_state( TASK_RUNNING );
+ remove_wait_queue(&pDelayWait, &wait);
+
del_timer ( pDelayTimer );
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)