This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] Cygwin: AF_UNIX: initialize rmem/wmem to 256K and use in pipe creation
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 6 Mar 2018 18:11:28 -0000
- Subject: [newlib-cygwin] Cygwin: AF_UNIX: initialize rmem/wmem to 256K and use in pipe creation
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c502700231b607cc8b45463980bc9ee482e3700e
commit c502700231b607cc8b45463980bc9ee482e3700e
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Tue Mar 6 18:28:15 2018 +0100
Cygwin: AF_UNIX: initialize rmem/wmem to 256K and use in pipe creation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/fhandler_socket_unix.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc
index f93b912..17d6f02 100644
--- a/winsup/cygwin/fhandler_socket_unix.cc
+++ b/winsup/cygwin/fhandler_socket_unix.cc
@@ -483,8 +483,7 @@ fhandler_socket_unix::create_pipe ()
FILE_PIPE_MESSAGE_TYPE,
FILE_PIPE_MESSAGE_MODE,
nonblocking, max_instances,
- PREFERRED_IO_BLKSIZE, PREFERRED_IO_BLKSIZE,
- &timeout);
+ rmem (), wmem (), &timeout);
if (!NT_SUCCESS (status))
system_printf ("NtCreateNamedPipeFile: %y", status);
return ph;
@@ -519,8 +518,7 @@ fhandler_socket_unix::create_pipe_instance ()
FILE_PIPE_MESSAGE_TYPE,
FILE_PIPE_MESSAGE_MODE,
nonblocking, max_instances,
- PREFERRED_IO_BLKSIZE, PREFERRED_IO_BLKSIZE,
- &timeout);
+ rmem (), wmem (), &timeout);
if (!NT_SUCCESS (status))
system_printf ("NtCreateNamedPipeFile: %y", status);
return ph;
@@ -588,6 +586,8 @@ fhandler_socket_unix::socket (int af, int type, int protocol, int flags)
set_errno (EPROTONOSUPPORT);
return -1;
}
+ rmem (262144);
+ wmem (262144);
set_addr_family (af);
set_socket_type (type);
if (flags & SOCK_NONBLOCK)