aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorIan Kelling2015-07-05 15:30:27 -0700
committerPaul Eggert2015-07-05 19:21:48 -0700
commit5dc66dbc15ad64b59bcb0943fa16961efc84e822 (patch)
tree202aeae52aac42577f51ce5de90136fa9518912f /src/process.c
parent08150826ae9e2e909d1f5aae8d4bdb4cd205b437 (diff)
downloademacs-5dc66dbc15ad64b59bcb0943fa16961efc84e822.tar.gz
emacs-5dc66dbc15ad64b59bcb0943fa16961efc84e822.zip
Remove ADAPTIVE_READ_BUFFERING ifdef
* src/process.c (make-process, make-pipe-process, deactivate_process) (wait_reading_process_output, read_process_output, send_process) (init_process_emacs): ifdef ADAPTIVE_READ_BUFFERING was originally added in case there was an operating system in which it was not useful. That was 11 years ago and it hasn't happened. Make development easier by not considering the effect of changes on a theoretical OS where this is disabled (Bug#20978).
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/process.c b/src/process.c
index 9442a9d6da9..50fa2743fd6 100644
--- a/src/process.c
+++ b/src/process.c
@@ -224,11 +224,6 @@ static EMACS_INT update_tick;
224# define HAVE_SEQPACKET 224# define HAVE_SEQPACKET
225#endif 225#endif
226 226
227#if !defined (ADAPTIVE_READ_BUFFERING) && !defined (NO_ADAPTIVE_READ_BUFFERING)
228#define ADAPTIVE_READ_BUFFERING
229#endif
230
231#ifdef ADAPTIVE_READ_BUFFERING
232#define READ_OUTPUT_DELAY_INCREMENT (TIMESPEC_RESOLUTION / 100) 227#define READ_OUTPUT_DELAY_INCREMENT (TIMESPEC_RESOLUTION / 100)
233#define READ_OUTPUT_DELAY_MAX (READ_OUTPUT_DELAY_INCREMENT * 5) 228#define READ_OUTPUT_DELAY_MAX (READ_OUTPUT_DELAY_INCREMENT * 5)
234#define READ_OUTPUT_DELAY_MAX_MAX (READ_OUTPUT_DELAY_INCREMENT * 7) 229#define READ_OUTPUT_DELAY_MAX_MAX (READ_OUTPUT_DELAY_INCREMENT * 7)
@@ -242,10 +237,6 @@ static int process_output_delay_count;
242 237
243static bool process_output_skip; 238static bool process_output_skip;
244 239
245#else
246#define process_output_delay_count 0
247#endif
248
249static void create_process (Lisp_Object, char **, Lisp_Object); 240static void create_process (Lisp_Object, char **, Lisp_Object);
250#ifdef USABLE_SIGIO 241#ifdef USABLE_SIGIO
251static bool keyboard_bit_set (fd_set *); 242static bool keyboard_bit_set (fd_set *);
@@ -1517,11 +1508,9 @@ usage: (make-process &rest ARGS) */)
1517 pset_gnutls_cred_type (XPROCESS (proc), Qnil); 1508 pset_gnutls_cred_type (XPROCESS (proc), Qnil);
1518#endif 1509#endif
1519 1510
1520#ifdef ADAPTIVE_READ_BUFFERING
1521 XPROCESS (proc)->adaptive_read_buffering 1511 XPROCESS (proc)->adaptive_read_buffering
1522 = (NILP (Vprocess_adaptive_read_buffering) ? 0 1512 = (NILP (Vprocess_adaptive_read_buffering) ? 0
1523 : EQ (Vprocess_adaptive_read_buffering, Qt) ? 1 : 2); 1513 : EQ (Vprocess_adaptive_read_buffering, Qt) ? 1 : 2);
1524#endif
1525 1514
1526 /* Make the process marker point into the process buffer (if any). */ 1515 /* Make the process marker point into the process buffer (if any). */
1527 if (BUFFERP (buffer)) 1516 if (BUFFERP (buffer))
@@ -2184,11 +2173,9 @@ usage: (make-pipe-process &rest ARGS) */)
2184 FD_SET (inchannel, &input_wait_mask); 2173 FD_SET (inchannel, &input_wait_mask);
2185 FD_SET (inchannel, &non_keyboard_wait_mask); 2174 FD_SET (inchannel, &non_keyboard_wait_mask);
2186 } 2175 }
2187#ifdef ADAPTIVE_READ_BUFFERING
2188 p->adaptive_read_buffering 2176 p->adaptive_read_buffering
2189 = (NILP (Vprocess_adaptive_read_buffering) ? 0 2177 = (NILP (Vprocess_adaptive_read_buffering) ? 0
2190 : EQ (Vprocess_adaptive_read_buffering, Qt) ? 1 : 2); 2178 : EQ (Vprocess_adaptive_read_buffering, Qt) ? 1 : 2);
2191#endif
2192 2179
2193 /* Make the process marker point into the process buffer (if any). */ 2180 /* Make the process marker point into the process buffer (if any). */
2194 if (BUFFERP (buffer)) 2181 if (BUFFERP (buffer))
@@ -4183,7 +4170,6 @@ deactivate_process (Lisp_Object proc)
4183 emacs_gnutls_deinit (proc); 4170 emacs_gnutls_deinit (proc);
4184#endif /* HAVE_GNUTLS */ 4171#endif /* HAVE_GNUTLS */
4185 4172
4186#ifdef ADAPTIVE_READ_BUFFERING
4187 if (p->read_output_delay > 0) 4173 if (p->read_output_delay > 0)
4188 { 4174 {
4189 if (--process_output_delay_count < 0) 4175 if (--process_output_delay_count < 0)
@@ -4191,7 +4177,6 @@ deactivate_process (Lisp_Object proc)
4191 p->read_output_delay = 0; 4177 p->read_output_delay = 0;
4192 p->read_output_skip = 0; 4178 p->read_output_skip = 0;
4193 } 4179 }
4194#endif
4195 4180
4196 /* Beware SIGCHLD hereabouts. */ 4181 /* Beware SIGCHLD hereabouts. */
4197 4182
@@ -4876,7 +4861,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4876 else 4861 else
4877 { 4862 {
4878 4863
4879#ifdef ADAPTIVE_READ_BUFFERING
4880 /* Set the timeout for adaptive read buffering if any 4864 /* Set the timeout for adaptive read buffering if any
4881 process has non-zero read_output_skip and non-zero 4865 process has non-zero read_output_skip and non-zero
4882 read_output_delay, and we are not reading output for a 4866 read_output_delay, and we are not reading output for a
@@ -4908,7 +4892,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4908 timeout = make_timespec (0, nsecs); 4892 timeout = make_timespec (0, nsecs);
4909 process_output_skip = 0; 4893 process_output_skip = 0;
4910 } 4894 }
4911#endif
4912 4895
4913#if defined (HAVE_NS) 4896#if defined (HAVE_NS)
4914 nfds = ns_select 4897 nfds = ns_select
@@ -5345,7 +5328,6 @@ read_process_output (Lisp_Object proc, int channel)
5345#endif 5328#endif
5346 nbytes = emacs_read (channel, chars + carryover + buffered, 5329 nbytes = emacs_read (channel, chars + carryover + buffered,
5347 readmax - buffered); 5330 readmax - buffered);
5348#ifdef ADAPTIVE_READ_BUFFERING
5349 if (nbytes > 0 && p->adaptive_read_buffering) 5331 if (nbytes > 0 && p->adaptive_read_buffering)
5350 { 5332 {
5351 int delay = p->read_output_delay; 5333 int delay = p->read_output_delay;
@@ -5371,7 +5353,6 @@ read_process_output (Lisp_Object proc, int channel)
5371 process_output_skip = 1; 5353 process_output_skip = 1;
5372 } 5354 }
5373 } 5355 }
5374#endif
5375 nbytes += buffered; 5356 nbytes += buffered;
5376 nbytes += buffered && nbytes <= 0; 5357 nbytes += buffered && nbytes <= 0;
5377 } 5358 }
@@ -5840,7 +5821,6 @@ send_process (Lisp_Object proc, const char *buf, ptrdiff_t len,
5840#endif 5821#endif
5841 written = emacs_write_sig (outfd, cur_buf, cur_len); 5822 written = emacs_write_sig (outfd, cur_buf, cur_len);
5842 rv = (written ? 0 : -1); 5823 rv = (written ? 0 : -1);
5843#ifdef ADAPTIVE_READ_BUFFERING
5844 if (p->read_output_delay > 0 5824 if (p->read_output_delay > 0
5845 && p->adaptive_read_buffering == 1) 5825 && p->adaptive_read_buffering == 1)
5846 { 5826 {
@@ -5848,7 +5828,6 @@ send_process (Lisp_Object proc, const char *buf, ptrdiff_t len,
5848 process_output_delay_count--; 5828 process_output_delay_count--;
5849 p->read_output_skip = 0; 5829 p->read_output_skip = 0;
5850 } 5830 }
5851#endif
5852 } 5831 }
5853 5832
5854 if (rv < 0) 5833 if (rv < 0)
@@ -7470,10 +7449,8 @@ init_process_emacs (void)
7470 num_pending_connects = 0; 7449 num_pending_connects = 0;
7471#endif 7450#endif
7472 7451
7473#ifdef ADAPTIVE_READ_BUFFERING
7474 process_output_delay_count = 0; 7452 process_output_delay_count = 0;
7475 process_output_skip = 0; 7453 process_output_skip = 0;
7476#endif
7477 7454
7478 /* Don't do this, it caused infinite select loops. The display 7455 /* Don't do this, it caused infinite select loops. The display
7479 method should call add_keyboard_wait_descriptor on stdin if it 7456 method should call add_keyboard_wait_descriptor on stdin if it
@@ -7638,7 +7615,6 @@ then a pipe is used in any case.
7638The value takes effect when `start-process' is called. */); 7615The value takes effect when `start-process' is called. */);
7639 Vprocess_connection_type = Qt; 7616 Vprocess_connection_type = Qt;
7640 7617
7641#ifdef ADAPTIVE_READ_BUFFERING
7642 DEFVAR_LISP ("process-adaptive-read-buffering", Vprocess_adaptive_read_buffering, 7618 DEFVAR_LISP ("process-adaptive-read-buffering", Vprocess_adaptive_read_buffering,
7643 doc: /* If non-nil, improve receive buffering by delaying after short reads. 7619 doc: /* If non-nil, improve receive buffering by delaying after short reads.
7644On some systems, when Emacs reads the output from a subprocess, the output data 7620On some systems, when Emacs reads the output from a subprocess, the output data
@@ -7650,7 +7626,6 @@ If the value is t, the delay is reset after each write to the process; any other
7650non-nil value means that the delay is not reset on write. 7626non-nil value means that the delay is not reset on write.
7651The variable takes effect when `start-process' is called. */); 7627The variable takes effect when `start-process' is called. */);
7652 Vprocess_adaptive_read_buffering = Qt; 7628 Vprocess_adaptive_read_buffering = Qt;
7653#endif
7654 7629
7655 defsubr (&Sprocessp); 7630 defsubr (&Sprocessp);
7656 defsubr (&Sget_process); 7631 defsubr (&Sget_process);