[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alt-arrow console switch sometimes dropped


Hi!

> > Alt-arrow console switch is routinely dropped under high load. This
> > patch fixes it: alt-arrow has to start from console _we want to switch
> > to_, if switch is already pending. Please apply,
> > 								Pavel
> 
> Sure, but a comment would be nice:
> 
> 	/* Currently switching?  Queue this next switch relative to
> > that. */

Oops, there was exactly the same problem in "fn_dec_console". Here's
incremental patch to add the comment and fix fn_dec_console,
too. I hope it is applicable.

								Pavel
--- tmp/linux/drivers/char/keyboard.c	2004-01-09 19:04:43.000000000 +0100
+++ linux/drivers/char/keyboard.c	2004-01-09 18:59:43.000000000 +0100
@@ -515,8 +515,13 @@
 static void fn_dec_console(struct vc_data *vc, struct pt_regs *regs)
 {
 	int i;
+	int cur = fg_console;
+
+	/* Currently switching?  Queue this next switch relative to that. */
+	if (want_console != -1)
+		cur = want_console;
  
-	for (i = fg_console-1; i != fg_console; i--) {
+	for (i = cur-1; i != cur; i--) {
 		if (i == -1)
 			i = MAX_NR_CONSOLES-1;
 		if (vc_cons_allocated(i))
@@ -530,6 +535,7 @@
 	int i;
 	int cur = fg_console;
 
+	/* Currently switching?  Queue this next switch relative to that. */
 	if (want_console != -1)
 		cur = want_console;
 
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」
References: