remove sigio blocking
authorBT Templeton <bt@hcoop.net>
Wed, 18 Sep 2013 04:19:06 +0000 (00:19 -0400)
committerRobin Templeton <robin@terpri.org>
Sun, 19 Apr 2015 07:43:02 +0000 (03:43 -0400)
* src/sysdep.c (request_sigio, unrequest_sigio): Remove. All callers
  changed.

src/dispextern.h
src/emacs.c
src/process.c
src/sysdep.c
src/xdisp.c

index 6a10f9c..8bca1e9 100644 (file)
@@ -3323,8 +3323,6 @@ int image_ascent (struct image *, struct face *, struct glyph_slice *);
 /* Defined in sysdep.c */
 
 void get_tty_size (int, int *, int *);
-void request_sigio (void);
-void unrequest_sigio (void);
 bool tabs_safe_p (int);
 void init_baud_rate (int);
 void init_sigio (int);
index 01b8368..ec32272 100644 (file)
@@ -2057,7 +2057,6 @@ shut_down_emacs (int sig, Lisp_Object stuff)
 
   /* There is a tendency for a SIGIO signal to arrive within exit,
      and cause a SIGHUP because the input descriptor is already closed.  */
-  unrequest_sigio ();
   ignore_sigio ();
 
   /* Do this only if terminating normally, we want glyph matrices
index e73f65a..d2aa046 100644 (file)
@@ -3384,8 +3384,6 @@ usage: (make-network-process &rest ARGS)  */)
   p->outfd = outch;
 
   dynwind_end ();
-
-  /* Unwind bind_polling_period and request_sigio.  */
   dynwind_end ();
 
   if (is_server && socktype != SOCK_DGRAM)
index e8b0057..b1b9bd4 100644 (file)
@@ -615,45 +615,6 @@ reset_sigio (int fd)
 }
 #endif
 
-void
-request_sigio (void)
-{
-#ifdef USABLE_SIGIO
-  sigset_t unblocked;
-
-  if (noninteractive)
-    return;
-
-  sigemptyset (&unblocked);
-# ifdef SIGWINCH
-  sigaddset (&unblocked, SIGWINCH);
-# endif
-  sigaddset (&unblocked, SIGIO);
-  pthread_sigmask (SIG_UNBLOCK, &unblocked, 0);
-
-  interrupts_deferred = 0;
-#endif
-}
-
-void
-unrequest_sigio (void)
-{
-#ifdef USABLE_SIGIO
-  sigset_t blocked;
-
-  if (noninteractive)
-    return;
-
-  sigemptyset (&blocked);
-# ifdef SIGWINCH
-  sigaddset (&blocked, SIGWINCH);
-# endif
-  sigaddset (&blocked, SIGIO);
-  pthread_sigmask (SIG_BLOCK, &blocked, 0);
-  interrupts_deferred = 1;
-#endif
-}
-
 void
 ignore_sigio (void)
 {
index eaffcf0..0390cfd 100644 (file)
@@ -13817,12 +13817,6 @@ redisplay_internal (void)
                        goto retry_frame;
                    }
 
-                 /* Prevent various kinds of signals during display
-                    update.  stdio is not robust about handling
-                    signals, which can cause an apparent I/O error.  */
-                 if (interrupt_input)
-                   unrequest_sigio ();
-
                  pending |= update_frame (f, 0, 0);
                  f->cursor_type_changed = 0;
                  f->updated_p = 1;
@@ -13873,12 +13867,6 @@ redisplay_internal (void)
       if (sf->fonts_changed)
        goto retry;
 
-      /* Prevent various kinds of signals during display update.
-        stdio is not robust about handling signals,
-        which can cause an apparent I/O error.  */
-      if (interrupt_input)
-       unrequest_sigio ();
-
       if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
        {
          if (hscroll_windows (selected_window))
@@ -13949,13 +13937,6 @@ redisplay_internal (void)
       windows_or_buffers_changed = 0;
     }
 
-  /* Start SIGIO interrupts coming again.  Having them off during the
-     code above makes it less likely one will discard output, but not
-     impossible, since there might be stuff in the system buffer here.
-     But it is much hairier to try to do anything about that.  */
-  if (interrupt_input)
-    request_sigio ();
-
   /* If a frame has become visible which was not before, redisplay
      again, so that we display it.  Expose events for such a frame
      (which it gets when becoming visible) don't call the parts of
@@ -14006,9 +13987,6 @@ redisplay_internal (void)
 #endif /* HAVE_WINDOW_SYSTEM */
 
  end_of_redisplay:
-  if (interrupt_input && interrupts_deferred)
-    request_sigio ();
-
   dynwind_end ();
 }