latest schedule_timeout() updates

Andrea Arcangeli (andrea@e-mind.com)
Wed, 4 Nov 1998 15:44:15 +0100 (CET)


These are the only schedule_timeout() related patches that I have on my
tree and that are not got merged yet. I had not thought that HZ could
be very little before to see your latest pre-...

Index: linux/drivers/pnp/parport_probe.c
diff -u linux/drivers/pnp/parport_probe.c:1.1.1.2 linux/drivers/pnp/parport_probe.c:1.1.1.1.12.3
--- linux/drivers/pnp/parport_probe.c:1.1.1.2 Sat Oct 24 15:40:33 1998
+++ linux/drivers/pnp/parport_probe.c Wed Nov 4 15:29:30 1998
@@ -105,8 +105,7 @@
switch (parport_ieee1284_nibble_mode_ok(port, 4)) {
case 1:
current->state=TASK_INTERRUPTIBLE;
- current->timeout=jiffies+1;
- schedule(); /* HACK: wait 10ms because printer seems to
+ schedule_timeout((HZ+99)/100); /* HACK: wait 10ms because printer seems to
* ack wrong */
result = read_polled(port, buffer, len);
break;
Index: linux/fs/smbfs/proc.c
diff -u linux/fs/smbfs/proc.c:1.1.1.1 linux/fs/smbfs/proc.c:1.1.1.1.14.2
--- linux/fs/smbfs/proc.c:1.1.1.1 Fri Oct 2 19:22:37 1998
+++ linux/fs/smbfs/proc.c Wed Nov 4 15:39:07 1998
@@ -520,9 +520,7 @@
/*
* Wait for the new connection.
*/
- current->timeout = jiffies + 5*HZ;
- interruptible_sleep_on(&server->wait);
- current->timeout = 0;
+ interruptible_sleep_on_timeout(&server->wait, 5*HZ);
if (signal_pending(current))
printk("smb_retry: caught signal\n");

@@ -1602,10 +1600,8 @@
/* Windows 95 is not able to deliver answers
* to FIND_NEXT fast enough, so sleep 0.2 sec
*/
- current->timeout = jiffies + HZ / 5;
current->state = TASK_INTERRUPTIBLE;
- schedule();
- current->timeout = 0;
+ schedule_timeout((HZ+4)/5);
}
}

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/