()
| 153 | |
| 154 | #[test] |
| 155 | fn test_msync() { |
| 156 | use rustix::mm::{mmap_anonymous, msync, munmap, MapFlags, MsyncFlags, ProtFlags}; |
| 157 | use std::ptr::null_mut; |
| 158 | |
| 159 | unsafe { |
| 160 | let addr = mmap_anonymous(null_mut(), 8192, ProtFlags::READ, MapFlags::PRIVATE).unwrap(); |
| 161 | |
| 162 | msync(addr, 8192, MsyncFlags::SYNC).unwrap(); |
| 163 | msync(addr, 8192, MsyncFlags::ASYNC).unwrap(); |
| 164 | |
| 165 | munmap(addr, 8192).unwrap(); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | #[cfg(any(target_os = "emscripten", target_os = "linux"))] |
| 170 | #[test] |
nothing calls this directly
no test coverage detected