Mail Archives: cygwin-developers/2001/10/22/23:35:23
This doesn't fix it.
It's probably worth doing the syscall alteration regardless though, for
performance on no-ops.
The real culprit is -finline-functions which is enabled
by -O3. -O3 -fno-inline-functions generates good (From a casual eyeball)
code. Jonathan: care to confirm this?
I'm having a casual look into why. Interestingly enough, the _chkstk
call goes away with -fno-inline-functions.
(the -fno-inline-functions does not disable all inlineing, just
automatic inlining of non 'inline' declared functions that weren't
implemented in the class definition).
Rob
----- Original Message -----
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: <cygwin-developers AT cygwin DOT com>
Sent: Tuesday, October 23, 2001 12:39 PM
Subject: Re: 1.3.4 status?
> What about this:
>
> Index: fhandler_console.cc
> ===================================================================
> RCS file: /cvs/src/src/winsup/cygwin/fhandler_console.cc,v
> retrieving revision 1.66
> diff -u -p -r1.66 fhandler_console.cc
> --- fhandler_console.cc 2001/10/22 18:39:22 1.66
> +++ fhandler_console.cc 2001/10/23 02:35:14
> @@ -198,9 +198,6 @@ fhandler_console::set_cursor_maybe ()
> int
> fhandler_console::read (void *pv, size_t buflen)
> {
> - if (!buflen)
> - return 0;
> -
> HANDLE h = get_io_handle ();
>
> #define buf ((char *) pv)
> Index: syscalls.cc
> ===================================================================
> RCS file: /cvs/src/src/winsup/cygwin/syscalls.cc,v
> retrieving revision 1.162
> diff -u -p -r1.162 syscalls.cc
> --- syscalls.cc 2001/10/22 18:31:00 1.162
> +++ syscalls.cc 2001/10/23 02:35:15
> @@ -290,6 +290,9 @@ _read (int fd, void *ptr, size_t len)
> if (__check_null_invalid_struct_errno (ptr, len))
> return -1;
>
> + if (!len)
> + return 0;
> +
> int res;
> extern int sigcatchers;
> int e = get_errno ();
>
> Check http://www.opengroup.org/onlinepubs/7908799/xsh/read.html if
> interested.
>
> Rob
>
>
- Raw text -