浏览代码

[PATCH] net/slip: replace schedule_timeout() with msleep_interruptible()

Use msleep_interruptible() instead of schedule_timeout() to guarantee
the task delays as expected.
Nishanth Aravamudan 20 年之前
父节点
当前提交
a9fc251089
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      drivers/net/slip.c

+ 2 - 4
drivers/net/slip.c

@@ -1383,10 +1383,8 @@ static void __exit slip_exit(void)
 	/* First of all: check for active disciplines and hangup them.
 	/* First of all: check for active disciplines and hangup them.
 	 */
 	 */
 	do {
 	do {
-		if (busy) {
-			set_current_state(TASK_INTERRUPTIBLE);
-			schedule_timeout(HZ / 10);
-		}
+		if (busy)
+			msleep_interruptible(100);
 
 
 		busy = 0;
 		busy = 0;
 		for (i = 0; i < slip_maxdev; i++) {
 		for (i = 0; i < slip_maxdev; i++) {