Begin paging module

This commit is contained in:
Philipp Oppermann
2015-11-19 15:44:38 +01:00
parent 0e574426c5
commit f917bd67a1
4 changed files with 25 additions and 1 deletions

View File

@@ -13,7 +13,7 @@
// limitations under the License.
#![feature(no_std, lang_items)]
#![feature(const_fn, unique, core_str_ext, iter_cmp)]
#![feature(const_fn, unique, core_str_ext, iter_cmp, optin_builtin_traits)]
#![no_std]
extern crate rlibc;

View File

@@ -1,5 +1,6 @@
pub use self::area_frame_allocator::AreaFrameAllocator;
mod paging;
mod area_frame_allocator;
pub const PAGE_SIZE: usize = 4096;

8
src/memory/paging/mod.rs Normal file
View File

@@ -0,0 +1,8 @@
/// The paging lock must be unique. It is required for all page table operations and thus
/// guarantees exclusive page table access.
pub struct Lock {
_private: (),
}
impl !Send for Lock {}
impl !Sync for Lock {}