Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

move mmap into sysdeps #524

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lucet-runtime/lucet-runtime-internals/src/alloc/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1134,4 +1134,4 @@ macro_rules! alloc_tests {
}

#[cfg(test)]
alloc_tests!(crate::region::mmap::MmapRegion);
alloc_tests!(crate::sysdeps::MmapRegion);
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ macro_rules! sparse_page_data_tests {

#[cfg(test)]
mod tests {
sparse_page_data_tests!(crate::region::mmap::MmapRegion);
sparse_page_data_tests!(crate::sysdeps::MmapRegion);
}
2 changes: 0 additions & 2 deletions lucet-runtime/lucet-runtime-internals/src/region.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
pub mod mmap;

use crate::alloc::{Alloc, AllocStrategy, Limits, Slot};
use crate::embed_ctx::CtxMap;
use crate::error::Error;
Expand Down
6 changes: 6 additions & 0 deletions lucet-runtime/lucet-runtime-internals/src/sysdeps/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ mod linux;
#[cfg(unix)]
mod unix;

#[cfg(unix)]
mod mmap;

#[cfg(target_os = "macos")]
pub use macos::*;

Expand All @@ -15,3 +18,6 @@ pub use linux::*;

#[cfg(unix)]
pub use unix::*;

#[cfg(unix)]
pub use mmap::*;
2 changes: 1 addition & 1 deletion lucet-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ pub use lucet_runtime_internals::instance::{
#[allow(deprecated)]
pub use lucet_runtime_internals::lucet_hostcalls;
pub use lucet_runtime_internals::module::{DlModule, Module};
pub use lucet_runtime_internals::region::mmap::MmapRegion;
pub use lucet_runtime_internals::region::{InstanceBuilder, Region, RegionCreate};
pub use lucet_runtime_internals::sysdeps::MmapRegion;
pub use lucet_runtime_internals::val::{UntypedRetVal, Val};
pub use lucet_runtime_internals::{lucet_hostcall, lucet_hostcall_terminate, WASM_PAGE_SIZE};

Expand Down