fn fork_from(
        &mut self,
        src: &Arc<VmAddressRegion>,
        page_table: &Arc<Mutex<dyn GenericPageTable>>,
    ) -> ZxResult {
        let src_guard = src.inner.lock();
        let src_inner = src_guard.as_ref().unwrap();
        for child in src_inner.children.iter() {
            self.fork_from(child, page_table)?;
        }
        for map in src_inner.mappings.iter() {
            let mapping = map.clone_map(page_table.clone())?;
            mapping.map()?;
            self.mappings.push(mapping);
        }
        Ok(())
    }
/// Clone the entire address space and VMOs from source VMAR. (For Linux fork)
Clone the entire address space and VMOs from source VMAR. (For Linux fork)
Clone the entire address space and VMOs from source VMAR . ( For Linux fork )
fn fork_from(
        &mut self,
        src: &Arc<VmAddressRegion>,
        page_table: &Arc<Mutex<dyn GenericPageTable>>,
    ) -> ZxResult {
        let src_guard = src.inner.lock();
        let src_inner = src_guard.as_ref().unwrap();
        for child in src_inner.children.iter() {
            self.fork_from(child, page_table)?;
        }
        for map in src_inner.mappings.iter() {
            let mapping = map.clone_map(page_table.clone())?;
            mapping.map()?;
            self.mappings.push(mapping);
        }
        Ok(())
    }
fn fork_from ( & mut self , src : & Arc < VmAddressRegion > , page_table : & Arc < Mutex < dyn GenericPageTable > > , ) -> ZxResult { let src_guard = src . inner . lock ( ) ; let src_inner = src_guard . as_ref ( ) . unwrap ( ) ; for child in src_inner . children . iter ( ) { self . fork_from ( child , page_table ) ? ; } for map in src_inner . mappings . iter ( ) { let mapping = map . clone_map ( page_table . clone ( ) ) ? ; mapping . map ( ) ? ; self . mappings . push ( mapping ) ; } Ok ( ( ) ) }
Clone the entire address space and VMOs from source VMAR.
Clone the entire address space and VMOs from source VMAR .
&mut self
src
&Arc<VmAddressRegion>
page_table
&Arc<Mutex<dyn GenericPageTable>>
&mut self
src
&Arc<VmAddressRegion>
page_table
&Arc<Mutex<dyn GenericPageTable>>