aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMartin Hunt <hunt@redhat.com>2001-12-18 18:54:18 +0000
committerMartin Hunt <hunt@redhat.com>2001-12-18 18:54:18 +0000
commit67a59bc02d4e7bd331e648efcf1d5a09fe048c56 (patch)
treef7a7589e3ee71fced1793f90626adb8fff812c23 /gdb
parentf0b79d91cbbaf7e2fc4441aee9b7a1527a18f078 (diff)
downloadgdb-67a59bc02d4e7bd331e648efcf1d5a09fe048c56.zip
gdb-67a59bc02d4e7bd331e648efcf1d5a09fe048c56.tar.gz
gdb-67a59bc02d4e7bd331e648efcf1d5a09fe048c56.tar.bz2
2001-12-18 Martin M. Hunt <hunt@redhat.com>
* ser-tcp.c (tcp_open): Disable Nagle algorithm which improves performance in some cases.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/ser-tcp.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 32a404d..e51664c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-18 Martin M. Hunt <hunt@redhat.com>
+
+ * ser-tcp.c (tcp_open): Disable Nagle algorithm which
+ improves performance in some cases.
+
2001-12-17 Ben Harris <bjh21@netbsd.org>
* armbsd-nat.c: Remove file, renamed to armnbsd-nat.c.
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index 6a65177..6dc8284 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -165,6 +165,11 @@ tcp_open (struct serial *scb, const char *name)
tmp = 0;
ioctl (scb->fd, FIONBIO, &tmp);
+ /* Disable Nagle algorithm. Needed in some cases. */
+ tmp = 1;
+ setsockopt (scb->fd, IPPROTO_TCP, TCP_NODELAY,
+ (char *)&tmp, sizeof (tmp));
+
/* If we don't do this, then GDB simply exits
when the remote side dies. */
signal (SIGPIPE, SIG_IGN);