summaryrefslogtreecommitdiff
path: root/src/sys/mman.rs
AgeCommit message (Collapse)Author
2020-04-21Add the MAP_HUGE_<SIZE> flags for linux.GuillaumeDIDIER
Closes #1194 Use git libc for development (Remember to reset this to released version for the next nix release, once libc has released >=0.2.69)
2019-06-02Fix the build on Linux/mips with recent libcAlan Somers
libc just undefined MADV_SOFT_OFFLINE on mips. https://github.com/rust-lang/libc/pull/1365 Fixes #1074
2019-01-22add `mman::mprotect`Adam C. Foltzer
2018-12-08Replace try! with ?Alan Somers
try! is not available in Rust 2018
2018-06-03Fix compilation on aarch64-unknown-linux-muslBryant Mairs
2018-03-27add docs for memory locking functionsAndreas Fackler
2018-03-27add mlockall and munlockallAndreas Fackler
2018-01-28Fail to compile for any unused codeBryant Mairs
2018-01-28Deny unused qualificationsBryant Mairs
2017-12-11Merge #806bors[bot]
806: Cleanup all doc warnings r=asomers a=Susurrus With the impending switch to Pulldown as the default doc generator, warnings have been enabled for incompatible syntax. This fixes all of said warnings.
2017-12-10Cleanup doc warningsBryant Mairs
With the impending switch to Pulldown as the default doc generator, warnings have been enabled for incompatible syntax. This fixes all of said warnings.
2017-12-04Stop reexporting `Errno` and its variantsJonas Schievink
cc #664 (unsure if this is everything needed)
2017-08-16Match libc_bitflags! syntax to upstream bitflags!Bryant Mairs
2017-08-11Use libc for FFI functions and constantsBryant Mairs
2017-06-18Fix BSD errorequal-l2
2017-06-18Update bitflags to 0.9equal-l2
2017-03-18Actually mark mmap and related functions as `unsafe`Kevin Mehall
The nix::sys::mman::mmap documentation says > Calls to mmap are inherently unsafe, so they must be made in an unsafe block. however, the function was not actually marked unsafe. * `munmap` should also be `unsafe` for obvious reasons. * `madvise` should be `unsafe` because of the MADV_DONTNEED flag. * `mlock` was already marked `unsafe` * `munlock` and `msync` don't strictly need to be `unsafe` despite taking pointers AFAICT, but are marked `unsafe` for consistency and in case they add additional flags in the future.
2017-02-19Fix the style for bitflags!Mathias Svensson
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over writing the constant manually.
2017-02-16Update bitflags to 0.7Simon Sapin
2016-07-18Fix NetBSD buildTobias Bucher
2016-03-16mman: Use libc_bitflags macro for ProtFlagsKamal Marhubi
This serves as an example use of the libc_bitflags macro.
2016-02-25Limit MAP_NOSYNC flag to FreeBSD kinVasily Kolobkov
2016-02-25Withdraw MAP_STACK flag from OpenBSDVasily Kolobkov
2016-02-25Use libcVasily Kolobkov
2016-01-29cfg out MAP_32BIT on non-x86arcnmx
2016-01-28Rename to MapFlags and MsFlags.Philipp Matthias Schaefer
2016-01-28Convert MS_ flags to bitflags! type.Philipp Matthias Schaefer
2016-01-28Convert PROT_ flags to bitflags! type.Philipp Matthias Schaefer
2016-01-28Convert MAP_ flags to bitflags! type.Philipp Matthias Schaefer
2016-01-28Move errno::Result back to crate rootarcnmx
2016-01-28Errno::result()arcnmx
2016-01-18allow improper_ctypes for size_tMattis Marjak
2015-11-20netbsd supportJeremy Fitzhardinge
2015-09-09Add/Fix support for DragonFly BSDMichael Neumann
2015-05-29Basic OpenBSD support.Laurence Tratt
Some of the tests are currently unrunnable, but the basic library is at least buildable.
2015-05-28Remove std::os::unix::io::RawFd re-exportCarl Lerche
2015-05-21Fix NixPath yield with CStr instead of OsStrCarl Lerche
As described in #117, the `AsExtStr` trait is defined to return a raw `*const libc::c_char`. Its impl for `OsStr` simply borrowed the byte slice from its `OsStr` argument and cast it to a `*const libc::c_char`, which does not construct a proper null-terminated C string. Given this, the `AsExtStr` is not necessary and is removed. `NixPath` is updated to yield `CStr`. Fixes #117, #120 Thanks to @dead10ck
2015-05-11Get the library to build on freebsdAndrew J. Stone
`cargo build` works.
2015-03-24NixResult -> nix::Result; NixError -> nix::ErrorCarl Lerche
2015-03-13Amend some files to make it compile on arm-linux-androideabi.kennytm
2015-02-27Further SockAddr & NixPath cleanupCarl Lerche
2015-02-10Add `NixPath`, `NixError`, and `NixResult`.Utkarsh Kukreti
2015-01-27Add a `Mode` bitflags and use it instead of `std::io::FilePermission`.Utkarsh Kukreti
These constants are defined in POSIX [1] so we should export them anyways, plus we don't need to depend on `std::io` anymore! [breaking-change] [1]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html
2015-01-13changed uint and int to usize and isize respectivelyRick Richardson
2015-01-07ToCStr removal falloutValerii Hiora
2015-01-03Update to rust masterValerii Hiora
- cstr fallout - deriving -> derive - lib stabilization warnings removal
2014-12-22Fixed building on iOSValerii Hiora
2014-12-17added msync, madvise, and requisite constants for macos and linuxRick Richardson
2014-10-27Add mmap, shm_open and other mman relativesPhil Vachon
Add various wrappers to make interacting with Rust a bit more pleasant for memory management. Additionally, provide ftruncate(2), which is useful when working with shared memory. Allow managing CPU affinity of a Rust Task living in a system thread.