fn init_region_internal(
        size: u64,
        region_type: RegionType,
        mem_mapping: Option<Arc<HostMemMapping>>,
        ops: Option<RegionOps>,
    ) -> Region {
        Region {
            region_type,
            priority: Arc::new(AtomicI32::new(0)),
            offset: Arc::new(Mutex::new(GuestAddress(0))),
            size: Arc::new(AtomicU64::new(size)),
            mem_mapping,
            ops,
            io_evtfds: Arc::new(Mutex::new(Vec::new())),
            space: Arc::new(RwLock::new(Weak::new())),
            subregions: Arc::new(RwLock::new(Vec::new())),
            rom_dev_romd: Arc::new(AtomicBool::new(false)),
        }
    }
/// The core function of initialization.
///
/// # Arguments
///
/// * `size` - Size of `Region`.
/// * `region_type` - Type of `Region`.
/// * `mem_mapping` - Mapped memory.
/// * `ops` - Region operations.
The core function of initialization.
The core function of initialization .
fn init_region_internal(
        size: u64,
        region_type: RegionType,
        mem_mapping: Option<Arc<HostMemMapping>>,
        ops: Option<RegionOps>,
    ) -> Region {
        Region {
            region_type,
            priority: Arc::new(AtomicI32::new(0)),
            offset: Arc::new(Mutex::new(GuestAddress(0))),
            size: Arc::new(AtomicU64::new(size)),
            mem_mapping,
            ops,
            io_evtfds: Arc::new(Mutex::new(Vec::new())),
            space: Arc::new(RwLock::new(Weak::new())),
            subregions: Arc::new(RwLock::new(Vec::new())),
            rom_dev_romd: Arc::new(AtomicBool::new(false)),
        }
    }
fn init_region_internal ( size : u64 , region_type : RegionType , mem_mapping : Option < Arc < HostMemMapping > > , ops : Option < RegionOps > , ) -> Region { Region { region_type , priority : Arc :: new ( AtomicI32 :: new ( 0 ) ) , offset : Arc :: new ( Mutex :: new ( GuestAddress ( 0 ) ) ) , size : Arc :: new ( AtomicU64 :: new ( size ) ) , mem_mapping , ops , io_evtfds : Arc :: new ( Mutex :: new ( Vec :: new ( ) ) ) , space : Arc :: new ( RwLock :: new ( Weak :: new ( ) ) ) , subregions : Arc :: new ( RwLock :: new ( Vec :: new ( ) ) ) , rom_dev_romd : Arc :: new ( AtomicBool :: new ( false ) ) , } }
The core function of initialization.
The core function of initialization .
size
u64
region_type
RegionType
mem_mapping
Option<Arc<HostMemMapping>>
ops
Option<RegionOps>
size
u64
region_type
RegionType
mem_mapping
Option<Arc<HostMemMapping>>
ops
Option<RegionOps>