pub fn write_state(&self, kind: ThreadStateKind, buf: &[u8]) -> ZxResult {
        let mut inner = self.inner.lock();
        let state = inner.state();
        if state != ThreadState::BlockedException && state != ThreadState::Suspended {
            if inner.exception.is_some() {
                return Err(ZxError::NOT_SUPPORTED);
            }
            return Err(ZxError::BAD_STATE);
        }
        let context = inner.context.as_mut().ok_or(ZxError::BAD_STATE)?;
        context.write_state(kind, buf)
    }
/// Write one aspect of thread state.
Write one aspect of thread state.
Write one aspect of thread state .
pub fn write_state(&self, kind: ThreadStateKind, buf: &[u8]) -> ZxResult {
        let mut inner = self.inner.lock();
        let state = inner.state();
        if state != ThreadState::BlockedException && state != ThreadState::Suspended {
            if inner.exception.is_some() {
                return Err(ZxError::NOT_SUPPORTED);
            }
            return Err(ZxError::BAD_STATE);
        }
        let context = inner.context.as_mut().ok_or(ZxError::BAD_STATE)?;
        context.write_state(kind, buf)
    }
pub fn write_state ( & self , kind : ThreadStateKind , buf : & [ u8 ] ) -> ZxResult { let mut inner = self . inner . lock ( ) ; let state = inner . state ( ) ; if state != ThreadState :: BlockedException && state != ThreadState :: Suspended { if inner . exception . is_some ( ) { return Err ( ZxError :: NOT_SUPPORTED ) ; } return Err ( ZxError :: BAD_STATE ) ; } let context = inner . context . as_mut ( ) . ok_or ( ZxError :: BAD_STATE ) ? ; context . write_state ( kind , buf ) }
Write one aspect of thread state.
Write one aspect of thread state .
&self
kind
ThreadStateKind
buf
&[u8]
&self
kind
ThreadStateKind
buf
&[u8]