patch-2.2.3 linux/kernel/printk.c

Next file: linux/mm/filemap.c
Previous file: linux/kernel/fork.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.2/linux/kernel/printk.c linux/kernel/printk.c
@@ -137,15 +137,9 @@
 		error = verify_area(VERIFY_WRITE,buf,len);
 		if (error)
 			goto out;
-		cli();
-		error = -ERESTARTSYS;
-		while (!log_size) {
-			if (signal_pending(current)) {
-				sti();
-				goto out;
-			}
-			interruptible_sleep_on(&log_wait);
-		}
+		error = wait_event_interruptible(log_wait, log_size);
+		if (error)
+			goto out;
 		i = 0;
 		while (log_size && i < len) {
 			c = *((char *) log_buf+log_start);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)