pub unsafe fn from_existing_mapping(mapping: CpuPageMapping) -> Self {
        let (current_asid, asid) = if let Some(asid_manager) = get_per_cpu_data().asid_manager() {
            (asid_manager.borrow_mut().alloc(Asid::null()), true)
        } else {
            (Asid::null(), false)
        };

        Self(Arc::new(ProtectionDomainInner {
            vma_allocator: Spinlock::new(VmaAllocator::new()),
            mapping,
            asid,
            current_asid: Atomic::new(current_asid),
        }))
    }
/// Creates a domain from an existing cpu page mapping.
Creates a domain from an existing cpu page mapping.
Creates a domain from an existing cpu page mapping .
pub unsafe fn from_existing_mapping(mapping: CpuPageMapping) -> Self {
        let (current_asid, asid) = if let Some(asid_manager) = get_per_cpu_data().asid_manager() {
            (asid_manager.borrow_mut().alloc(Asid::null()), true)
        } else {
            (Asid::null(), false)
        };
        Self(Arc::new(ProtectionDomainInner {
            vma_allocator: Spinlock::new(VmaAllocator::new()),
            mapping,
            asid,
            current_asid: Atomic::new(current_asid),
        }))
    }
pub unsafe fn from_existing_mapping ( mapping : CpuPageMapping ) -> Self { let ( current_asid , asid ) = if let Some ( asid_manager ) = get_per_cpu_data ( ) . asid_manager ( ) { ( asid_manager . borrow_mut ( ) . alloc ( Asid :: null ( ) ) , true ) } else { ( Asid :: null ( ) , false ) } ; Self ( Arc :: new ( ProtectionDomainInner { vma_allocator : Spinlock :: new ( VmaAllocator :: new ( ) ) , mapping , asid , current_asid : Atomic :: new ( current_asid ) , } ) ) }
Creates a domain from an existing cpu page mapping.
Creates a domain from an existing cpu page mapping .
mapping
CpuPageMapping
mapping
CpuPageMapping