pub async fn sys_object_wait_one(
        &self,
        handle: HandleValue,
        signals: u32,
        deadline: Deadline,
        mut observed: UserOutPtr<Signal>,
    ) -> ZxResult {
        let signals = Signal::from_bits_truncate(signals);
        info!(
            "object.wait_one: handle={:#x?}, signals={:#x?}, deadline={:#x?}, observed={:#x?}",
            handle, signals, deadline, observed
        );
        let proc = self.thread.proc();
        let object = proc.get_dyn_object_with_rights(handle, Rights::WAIT)?;
        let cancel_token = proc.get_cancel_token(handle)?;
        let future = object.wait_signal(signals);
        let signal = self
            .thread
            .blocking_run(
                future,
                ThreadState::BlockedWaitOne,
                deadline.into(),
                Some(cancel_token),
            )
            .await
            .or_else(|e| {
                if e == ZxError::TIMED_OUT {
                    observed.write_if_not_null(object.signal())?;
                }
                Err(e)
            })?;
        observed.write_if_not_null(signal)?;
        Ok(())
    }
/// A blocking syscall waits for signals on an object.
A blocking syscall waits for signals on an object.
A blocking syscall waits for signals on an object .
pub async fn sys_object_wait_one(
        &self,
        handle: HandleValue,
        signals: u32,
        deadline: Deadline,
        mut observed: UserOutPtr<Signal>,
    ) -> ZxResult {
        let signals = Signal::from_bits_truncate(signals);
        info!(
            "object.wait_one: handle={:#x?}, signals={:#x?}, deadline={:#x?}, observed={:#x?}",
            handle, signals, deadline, observed
        );
        let proc = self.thread.proc();
        let object = proc.get_dyn_object_with_rights(handle, Rights::WAIT)?;
        let cancel_token = proc.get_cancel_token(handle)?;
        let future = object.wait_signal(signals);
        let signal = self
            .thread
            .blocking_run(
                future,
                ThreadState::BlockedWaitOne,
                deadline.into(),
                Some(cancel_token),
            )
            .await
            .or_else(|e| {
                if e == ZxError::TIMED_OUT {
                    observed.write_if_not_null(object.signal())?;
                }
                Err(e)
            })?;
        observed.write_if_not_null(signal)?;
        Ok(())
    }
pub async fn sys_object_wait_one ( & self , handle : HandleValue , signals : u32 , deadline : Deadline , mut observed : UserOutPtr < Signal > , ) -> ZxResult { let signals = Signal :: from_bits_truncate ( signals ) ; info ! ( " " handle signals deadline observed ) ; let proc = self . thread . proc ( ) ; let object = proc . get_dyn_object_with_rights ( handle , Rights :: WAIT ) ? ; let cancel_token = proc . get_cancel_token ( handle ) ? ; let future = object . wait_signal ( signals ) ; let signal = self . thread . blocking_run ( future , ThreadState :: BlockedWaitOne , deadline . into ( ) , Some ( cancel_token ) , ) . await . or_else ( | e | { if e == ZxError :: TIMED_OUT { observed . write_if_not_null ( object . signal ( ) ) ? ; } Err ( e ) } ) ? ; observed . write_if_not_null ( signal ) ? ; Ok ( ( ) ) }
A blocking syscall waits for signals on an object.
A blocking syscall waits for signals on an object .
&self
handle
HandleValue
signals
u32
deadline
Deadline
observed
UserOutPtr<Signal>
&self
handle
HandleValue
signals
u32
deadline
Deadline
observed
UserOutPtr<Signal>