Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-11-29 19:28:05 +0300
committerCorinna Vinschen <corinna@vinschen.de>2005-11-29 19:28:05 +0300
commita020c74a8d0a0b3399530731a58530b5cbe5297b (patch)
tree712ed3cdcb60499c2f7c99e10279934cbe4f905e /winsup/cygwin/include/sys
parentf90e23f2714cb3173d57ee470f6fdc631561cd13 (diff)
* fhandler.h (fhandler_dev_zero::mmap): Add method.
(fhandler_dev_zero::munmap): Ditto. (fhandler_dev_zero::msync): Ditto. (fhandler_dev_zero::fixup_mmap_after_fork): Ditto. * mmap.cc: Implement anonymous mapping using fhandler_dev_zero class. Implement private anonymous maps using VirtualAlloc/VirtualFree. Fix or add some more comments. (fh_paging_file): Change to type fhandler_dev_zero. (priv): New static inline function to avoid having lots of flag bit tests in the code. Use throughout were appropriate. (fixed): Ditto. (anonymous): Ditto. (noreserve): Ditto. (autogrow): Ditto. (gen_protect): Never generate PAGE_WRITECOPY protection for private anonymous maps. (gen_access): Drop FILE_MAP_EXECUTE handling since it's not supported correctly on 9x. (VirtualProt9x): Move comment from mmap64 here. (mmap_record::mmap_record): Gegerate correct device entry for anonymous maps, though unused right now. (mmap_record::priv): Call global priv function. (mmap_record::fixed): Call global fixed function. (mmap_record::anonymous): Call global anonymous function. (mmap_record::noreserve): Call global noreserve function. (mmap_record::autogrow): Call global autogrow function. (list::anonymous): New method. Use throughout were appropriate. (mmap_record::compatible_flags): Drop now useless ifdef. (mmap_record::alloc_page_map): Accomodate private anonymous maps. (mmap_record::map_pages): Accomodate MAP_NORESERVE mappings. (mmap_record::unmap_pages): Accomodate private anonymous maps. (mmap64): Simplify argument check. Don't remove the MAP_PRIVATE flag for anonymous mappings on 9x anymore since that's now handled gracefully. (mprotect): Accomodate MAP_NORESERVE mappings. Fix case when non-mmap areas are just MEM_RESERVEd. (fhandler_dev_zero::mmap): Implement anonymous mapping here. (fhandler_dev_zero::munmap): Ditto. (fhandler_dev_zero::msyn): Ditto. (fhandler_dev_zero::fixup_mmap_after_fork): Ditto. (fixup_mmaps_after_fork): Accomodate private anonymous maps. Enhance debug output in case VirtualProtect fails. * include/sys/mman.h: Really define MAP_NORESERVE now.
Diffstat (limited to 'winsup/cygwin/include/sys')
-rw-r--r--winsup/cygwin/include/sys/mman.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/include/sys/mman.h b/winsup/cygwin/include/sys/mman.h
index d81e22215..f501b7b75 100644
--- a/winsup/cygwin/include/sys/mman.h
+++ b/winsup/cygwin/include/sys/mman.h
@@ -31,11 +31,10 @@ extern "C" {
#define MAP_ANONYMOUS 0x20
#define MAP_ANON MAP_ANONYMOUS
/* Non-standard flag */
-#if 0 /* Not yet implemented */
#define MAP_NORESERVE 0x4000 /* Don't reserve swap space for this mapping.
Page protection must be set explicitely
- to access page. */
-#endif
+ to access page. Only supported for anonymous
+ private mappings. */
#define MAP_AUTOGROW 0x8000 /* Grow underlying object to mapping size.
File must be opened for writing. */