This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: allow read into untouched noreserve mappings
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Mon, 17 Jul 2006 22:47:39 +0200
- Subject: Re: allow read into untouched noreserve mappings
- References: <Pine.CYG.4.58.0607121318080.2284@PC1163-8460-XP.flightsafety.com> <20060712202215.GS8759@calimero.vinschen.de> <Pine.CYG.4.58.0607121536330.3784@PC1163-8460-XP.flightsafety.com> <20060713103431.GA17383@calimero.vinschen.de> <Pine.CYG.4.58.0607130933400.1164@PC1163-8460-XP.flightsafety.com> <Pine.CYG.4.58.0607131315110.3316@PC1163-8460-XP.flightsafety.com> <20060714091601.GD8759@calimero.vinschen.de> <Pine.CYG.4.58.0607140931050.3316@PC1163-8460-XP.flightsafety.com> <20060714155523.GL8759@calimero.vinschen.de> <Pine.CYG.4.58.0607171205100.2704@PC1163-8460-XP.flightsafety.com>
- Reply-to: cygwin-patches at cygwin dot com
On Jul 17 12:25, Brian Ford wrote:
> On Fri, 14 Jul 2006, Corinna Vinschen wrote:
>
> > The idea is to have features working for most cases and then
> > to get it working gradually better.
>
> Well, in that spirit then, the attached patch allows read and varients to
> use untouched noreserve mappings as buffers. If this is accepted, I'll
> consider doing something similar for recvmsg and recvfrom. That should
> cover the majority of cases, I believe.
>
> 2006-07-17 Brian Ford <Brian.Ford@FlightSafety.com>
>
> * winsup.h (mmap_commit_noreserve_pages): New prototype.
> * mmap.cc (fhandler_base::raw_read): New function.
> * fhandler.cc (fhandler_base::raw_read): Call it for
> INVALID_PARAMETER errors, and retry on success to allow
> reads into untouched MAP_NORESERVE buffers.
Sorry but... ERROR_INVALID_PARAMETER? When I debugged this I got
ERROR_NOACCESS. What system was that running on?
I would rather see the mmap_commit_noreserve_pages functionality folded
into the existing mmap_is_attached_or_noreserve_page function (add
parameter, see if len == 0 or > 0, yada yada yada) so that there's
only one function which does the work, regardless from where it's called.
Other than that it looks like a good start.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat