pub fn sys_interrupt_bind(
        &self,
        interrupt: HandleValue,
        port: HandleValue,
        key: u64,
        options: u32,
    ) -> ZxResult {
        info!(
            "interrupt.bind: interrupt={:?} port={:?} key={:?} options={:?}",
            interrupt, port, key, options
        );
        let proc = self.thread.proc();
        let interrupt = proc.get_object_with_rights::<Interrupt>(interrupt, Rights::READ)?;
        let port = proc.get_object_with_rights::<Port>(port, Rights::WRITE)?;
        if !port.can_bind_to_interrupt() {
            return Err(ZxError::WRONG_TYPE);
        }
        if options == InterruptOp::Bind as _ {
            interrupt.bind(&port, key)
        } else if options == InterruptOp::Unbind as _ {
            interrupt.unbind(&port)
        } else {
            Err(ZxError::INVALID_ARGS)
        }
    }
/// Binds or unbinds an interrupt object to a port.
///
/// The key used when binding the interrupt will be present in the key field of the `zx_port_packet_t`.
Binds or unbinds an interrupt object to a port.
The key used when binding the interrupt will be present in the key field of the `zx_port_packet_t`.
Binds or unbinds an interrupt object to a port . The key used when binding the interrupt will be present in the key field of the ` zx_port_packet_t ` .
pub fn sys_interrupt_bind(
        &self,
        interrupt: HandleValue,
        port: HandleValue,
        key: u64,
        options: u32,
    ) -> ZxResult {
        info!(
            "interrupt.bind: interrupt={:?} port={:?} key={:?} options={:?}",
            interrupt, port, key, options
        );
        let proc = self.thread.proc();
        let interrupt = proc.get_object_with_rights::<Interrupt>(interrupt, Rights::READ)?;
        let port = proc.get_object_with_rights::<Port>(port, Rights::WRITE)?;
        if !port.can_bind_to_interrupt() {
            return Err(ZxError::WRONG_TYPE);
        }
        if options == InterruptOp::Bind as _ {
            interrupt.bind(&port, key)
        } else if options == InterruptOp::Unbind as _ {
            interrupt.unbind(&port)
        } else {
            Err(ZxError::INVALID_ARGS)
        }
    }
pub fn sys_interrupt_bind ( & self , interrupt : HandleValue , port : HandleValue , key : u64 , options : u32 , ) -> ZxResult { info ! ( " " interrupt port key options ) ; let proc = self . thread . proc ( ) ; let interrupt = proc . get_object_with_rights :: < Interrupt > ( interrupt , Rights :: READ ) ? ; let port = proc . get_object_with_rights :: < Port > ( port , Rights :: WRITE ) ? ; if ! port . can_bind_to_interrupt ( ) { return Err ( ZxError :: WRONG_TYPE ) ; } if options == InterruptOp :: Bind as _ { interrupt . bind ( & port , key ) } else if options == InterruptOp :: Unbind as _ { interrupt . unbind ( & port ) } else { Err ( ZxError :: INVALID_ARGS ) } }
Binds or unbinds an interrupt object to a port.
Binds or unbinds an interrupt object to a port .
&self
interrupt
HandleValue
port
HandleValue
key
u64
options
u32
&self
interrupt
HandleValue
port
HandleValue
key
u64
options
u32