This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: allow read into untouched noreserve mappings


On Mon, 17 Jul 2006, Corinna Vinschen wrote:

> Sorry but... ERROR_INVALID_PARAMETER?  When I debugged this I got
> ERROR_NOACCESS.

You are correct.  The case fall through combined with the earlier EISDIR
error confused me.  That, and the fact that the patch actually worked ;-).

> 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.

I was trying to be less intrusive and that looked messy.  Oh, well...

Untested this time because I have to run to an appointment.

2006-07-17  Brian Ford  <Brian.Ford@FlightSafety.com>

	* winsup.h (mmap_region_status): New enum.
	(mmap_is_attached_or_noreserve_page): Adjust prototype and rename
	as below.
	* mmap.cc (mmap_is_attached_or_noreserve_page):  Rename
	mmap_is_attached_or_noreserve.  Add region length parameter.
	Return enum above.
	* exceptions.cc (_cygtls::handle_exceptions): Accomodate above.
	* fhandler.cc (fhandler_base::raw_read): Call above for NOACCESS
	errors and retry on success to allow reads into untouched
	MAP_NORESERVE buffers.

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...
.

Attachment: read_noreserve.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]