Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Working mmap.
* Also replaced syscall! with in-tree version that calls syscall_return() on result. * Learned how to use and read strace and objdump today too.
- Loading branch information
Showing
with
117 additions
and 45 deletions.
- +1 −0 .gitignore
- +3 −0 Cargo.toml
- +0 −38 musl/src/mman/mmap.c
- +3 −2 src/lib.rs
- +52 −2 src/mmap.rs
- +1 −0 src/platform/linux-x86_64/c_types.rs
- +7 −1 src/platform/linux-x86_64/mman.rs
- +50 −2 src/syscall_mgt.rs
@@ -1 +1,7 @@ | ||
pub const MAP_FAILED: usize = (!1i64) as usize; | ||
use c_types::*; | ||
|
||
pub const PAGE_SIZE: off_t = 4096; | ||
|
||
pub const MAP_FAILED: *mut c_void = 0xffffffffffffffff as *mut c_void; | ||
|
||
pub const MAP_FIXED: c_int = 0x10; |