Commit Graph

9 Commits

Author SHA1 Message Date
Szabolcs Nagy e9f1c7981a deduplicate bits/mman.h
currently five targets use the same mman.h constants and the rest
share most constants too, so move them to sys/mman.h before the
bits/mman.h include where the differences can be corrected by
redefinition of the macros.

this fixes two minor bugs: POSIX_MADV_DONTNEED was wrong on most
targets (it should be the same as MADV_DONTNEED), and sh defined
the x86-only MAP_32BIT mmap flag.
2016-03-18 22:40:28 -04:00
Szabolcs Nagy 789ff6a9f8 add MCL_ONFAULT and MLOCK_ONFAULT mlockall and mlock2 flags
they lock faulted pages into memory (useful when a small part of a
large mapped file needs efficient access), new in linux v4.4, commit
b0f205c2a3082dd9081f9a94e50658c5fa906ff1

MLOCK_* is not in the POSIX reserved namespace for sys/mman.h
2016-01-26 18:31:05 -05:00
Trutz Behn 2d67ae923d move MREMAP_MAYMOVE and MREMAP_FIXED out of bits
the definitions are generic for all kernel archs. exposure of these
macros now only occurs on the same feature test as for the function
accepting them, which is believed to be more correct.
2015-01-30 22:02:23 -05:00
Szabolcs Nagy 000806cde6 add missing mmap options and madvices to bits/mman.h based on linux headers 2013-01-12 19:42:39 +01:00
rofl0r 7e0d4fce41 add more arch-specific MAP_ macros to bits/mman.h
these are also needed by qemu.
2012-12-06 16:57:22 +01:00
rofl0r 0e10f74006 add MAP_NORESERVE to bits/mman.h
this is needed for qemu, and since it differs for each arch
it can't be circumvented easily by using a macro in CFLAGS.
2012-12-06 01:26:51 +01:00
Rich Felker 030b452b8d fix missing _BSD_SOURCE support in bits/*.h
this is actually rather ugly, and would get even uglier if we ever
want to support further feature test macros. at some point i may
factor the bits headers into separate files for C base, POSIX base,
and nonstandard extensions (the only distinctions that seem to matter
now) and then the logic for which to include can go in the main header
rather than being duplicated for each arch. the downside of this is
that it would result in more files having to be opened during
compilation, so as long as the ugliness does not grow, i'm inclined to
leave it alone for now.
2012-05-22 22:12:10 -04:00
Rich Felker b052f13cd1 namespace fixes for sys/mman.h 2011-04-20 15:55:58 -04:00
Nicholas J. Kain 1e12632591 Port musl to x86-64. One giant commit! 2011-02-15 07:32:09 -05:00