pub fn new(guest: Arc<Guest>, entry: u64, thread: Arc<Thread>) -> ZxResult<Arc<Self>> {
        if thread.flags().contains(ThreadFlag::VCPU) {
            return Err(ZxError::BAD_STATE);
        }
        let inner = Mutex::new(VcpuInner::new(entry, guest.rvm_guest())?);
        thread.update_flags(|flags| flags.insert(ThreadFlag::VCPU));
        Ok(Arc::new(Vcpu {
            base: KObjectBase::new(),
            _counter: CountHelper::new(),
            thread,
            inner,
        }))
    }
/// Create a new VCPU within a guest.
Create a new VCPU within a guest.
Create a new VCPU within a guest .
pub fn new(guest: Arc<Guest>, entry: u64, thread: Arc<Thread>) -> ZxResult<Arc<Self>> {
        if thread.flags().contains(ThreadFlag::VCPU) {
            return Err(ZxError::BAD_STATE);
        }
        let inner = Mutex::new(VcpuInner::new(entry, guest.rvm_guest())?);
        thread.update_flags(|flags| flags.insert(ThreadFlag::VCPU));
        Ok(Arc::new(Vcpu {
            base: KObjectBase::new(),
            _counter: CountHelper::new(),
            thread,
            inner,
        }))
    }
pub fn new ( guest : Arc < Guest > , entry : u64 , thread : Arc < Thread > ) -> ZxResult < Arc < Self > > { if thread . flags ( ) . contains ( ThreadFlag :: VCPU ) { return Err ( ZxError :: BAD_STATE ) ; } let inner = Mutex :: new ( VcpuInner :: new ( entry , guest . rvm_guest ( ) ) ? ) ; thread . update_flags ( | flags | flags . insert ( ThreadFlag :: VCPU ) ) ; Ok ( Arc :: new ( Vcpu { base : KObjectBase :: new ( ) , _counter : CountHelper :: new ( ) , thread , inner , } ) ) }
Create a new VCPU within a guest.
Create a new VCPU within a guest .
guest
Arc<Guest>
entry
u64
thread
Arc<Thread>
guest
Arc<Guest>
entry
u64
thread
Arc<Thread>