emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/src keyboard.c


From: Chong Yidong
Subject: [Emacs-diffs] emacs/src keyboard.c
Date: Thu, 29 Jan 2009 14:34:16 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/01/29 14:34:16

Modified files:
        src            : keyboard.c 

Log message:
        (pending_signals): New var.
        (poll_for_input, input_available_signal, init_keyboard): Set it.
        (process_pending_signals): New function.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/keyboard.c?cvsroot=emacs&r1=1.991&r2=1.992

Patches:
Index: keyboard.c
===================================================================
RCS file: /sources/emacs/emacs/src/keyboard.c,v
retrieving revision 1.991
retrieving revision 1.992
diff -u -b -r1.991 -r1.992
--- keyboard.c  25 Jan 2009 19:43:34 -0000      1.991
+++ keyboard.c  29 Jan 2009 14:34:16 -0000      1.992
@@ -91,6 +91,13 @@
    during the current critical section.  */
 int interrupt_input_pending;
 
+/* This var should be (interrupt_input_pending || pending_atimers).
+   The QUIT macro checks this instead of interrupt_input_pending and
+   pending_atimers separately, to reduce code size.  So, any code that
+   changes interrupt_input_pending or pending_atimers should update
+   this too.  */
+int pending_signals;
+
 #define KBD_BUFFER_SIZE 4096
 
 KBOARD *initial_kboard;
@@ -2193,11 +2200,14 @@
      struct atimer *timer;
 {
   if (poll_suppress_count == 0)
+    {
 #ifdef SYNC_INPUT
     interrupt_input_pending = 1;
+      pending_signals = 1;
 #else
     poll_for_input_1 ();
 #endif
+    }
 }
 
 #endif /* POLL_FOR_INPUT */
@@ -7261,6 +7271,7 @@
 handle_async_input ()
 {
   interrupt_input_pending = 0;
+  pending_signals = pending_atimers;
 
   while (1)
     {
@@ -7274,6 +7285,14 @@
     }
 }
 
+void
+process_pending_signals ()
+{
+  if (interrupt_input_pending)
+    handle_async_input ();
+  do_pending_atimers ();
+}
+
 #ifdef SIGIO   /* for entire page */
 /* Note SIGIO has been undef'd if FIONREAD is missing.  */
 
@@ -7291,6 +7310,7 @@
 
 #ifdef SYNC_INPUT
   interrupt_input_pending = 1;
+  pending_signals = 1;
 #else
   SIGNAL_THREAD_CHECK (signo);
 #endif
@@ -11536,6 +11556,7 @@
   input_pending = 0;
   interrupt_input_blocked = 0;
   interrupt_input_pending = 0;
+  pending_signals = 0;
 
   /* This means that command_loop_1 won't try to select anything the first
      time through.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]