pub fn sys_thread_write_state(
        &self,
        handle: HandleValue,
        kind: u32,
        buffer: UserInPtr<u8>,
        buffer_size: usize,
    ) -> ZxResult {
        let kind = ThreadStateKind::try_from(kind).map_err(|_| ZxError::INVALID_ARGS)?;
        info!(
            "thread.write_state: handle={:#x?}, kind={:#x?}, buf=({:#x?}; {:#x?})",
            handle, kind, buffer, buffer_size,
        );
        let proc = self.thread.proc();
        let thread = proc.get_object_with_rights::<Thread>(handle, Rights::WRITE)?;
        let buf = buffer.read_array(buffer_size)?;
        thread.write_state(kind, &buf)?;
        Ok(())
    }
/// Write one aspect of thread state.
///
/// The thread state may only be written when the thread is halted for an exception or the thread is suspended.
Write one aspect of thread state.
The thread state may only be written when the thread is halted for an exception or the thread is suspended.
Write one aspect of thread state . The thread state may only be written when the thread is halted for an exception or the thread is suspended .
pub fn sys_thread_write_state(
        &self,
        handle: HandleValue,
        kind: u32,
        buffer: UserInPtr<u8>,
        buffer_size: usize,
    ) -> ZxResult {
        let kind = ThreadStateKind::try_from(kind).map_err(|_| ZxError::INVALID_ARGS)?;
        info!(
            "thread.write_state: handle={:#x?}, kind={:#x?}, buf=({:#x?}; {:#x?})",
            handle, kind, buffer, buffer_size,
        );
        let proc = self.thread.proc();
        let thread = proc.get_object_with_rights::<Thread>(handle, Rights::WRITE)?;
        let buf = buffer.read_array(buffer_size)?;
        thread.write_state(kind, &buf)?;
        Ok(())
    }
pub fn sys_thread_write_state ( & self , handle : HandleValue , kind : u32 , buffer : UserInPtr < u8 > , buffer_size : usize , ) -> ZxResult { let kind = ThreadStateKind :: try_from ( kind ) . map_err ( | _ | ZxError :: INVALID_ARGS ) ? ; info ! ( " " handle kind buffer buffer_size ) ; let proc = self . thread . proc ( ) ; let thread = proc . get_object_with_rights :: < Thread > ( handle , Rights :: WRITE ) ? ; let buf = buffer . read_array ( buffer_size ) ? ; thread . write_state ( kind , & buf ) ? ; Ok ( ( ) ) }
Write one aspect of thread state.
Write one aspect of thread state .
&self
handle
HandleValue
kind
u32
buffer
UserInPtr<u8>
buffer_size
usize
&self
handle
HandleValue
kind
u32
buffer
UserInPtr<u8>
buffer_size
usize