pub fn sys_process_start(
        &self,
        proc_handle: HandleValue,
        thread_handle: HandleValue,
        entry: usize,
        stack: usize,
        arg1_handle: HandleValue,
        arg2: usize,
    ) -> ZxResult {
        info!("process.start: proc_handle={:?}, thread_handle={:?}, entry={:?}, stack={:?}, arg1_handle={:?}, arg2={:?}",
            proc_handle, thread_handle, entry, stack, arg1_handle, arg2
        );
        let proc = self.thread.proc();
        let process = proc.get_object_with_rights::<Process>(proc_handle, Rights::WRITE)?;
        let thread = proc.get_object_with_rights::<Thread>(thread_handle, Rights::WRITE)?;
        if !Arc::ptr_eq(thread.proc(), &process) {
            return Err(ZxError::ACCESS_DENIED);
        }
        let arg1 = if arg1_handle != INVALID_HANDLE {
            let arg1 = proc.remove_handle(arg1_handle)?;
            if !arg1.rights.contains(Rights::TRANSFER) {
                return Err(ZxError::ACCESS_DENIED);
            }
            Some(arg1)
        } else {
            None
        };
        process.start(&thread, entry, stack, arg1, arg2, self.thread_fn)?;
        Ok(())
    }
/// Start execution on a process.
///
/// This system call is similar to `zx_thread_start()`, but is used for the purpose of starting the first thread in a process.
Start execution on a process.
This system call is similar to `zx_thread_start()`, but is used for the purpose of starting the first thread in a process.
Start execution on a process . This system call is similar to ` zx_thread_start () ` but is used for the purpose of starting the first thread in a process .
pub fn sys_process_start(
        &self,
        proc_handle: HandleValue,
        thread_handle: HandleValue,
        entry: usize,
        stack: usize,
        arg1_handle: HandleValue,
        arg2: usize,
    ) -> ZxResult {
        info!("process.start: proc_handle={:?}, thread_handle={:?}, entry={:?}, stack={:?}, arg1_handle={:?}, arg2={:?}",
            proc_handle, thread_handle, entry, stack, arg1_handle, arg2
        );
        let proc = self.thread.proc();
        let process = proc.get_object_with_rights::<Process>(proc_handle, Rights::WRITE)?;
        let thread = proc.get_object_with_rights::<Thread>(thread_handle, Rights::WRITE)?;
        if !Arc::ptr_eq(thread.proc(), &process) {
            return Err(ZxError::ACCESS_DENIED);
        }
        let arg1 = if arg1_handle != INVALID_HANDLE {
            let arg1 = proc.remove_handle(arg1_handle)?;
            if !arg1.rights.contains(Rights::TRANSFER) {
                return Err(ZxError::ACCESS_DENIED);
            }
            Some(arg1)
        } else {
            None
        };
        process.start(&thread, entry, stack, arg1, arg2, self.thread_fn)?;
        Ok(())
    }
pub fn sys_process_start ( & self , proc_handle : HandleValue , thread_handle : HandleValue , entry : usize , stack : usize , arg1_handle : HandleValue , arg2 : usize , ) -> ZxResult { info ! ( " " proc_handle thread_handle entry stack arg1_handle arg2 ) ; let proc = self . thread . proc ( ) ; let process = proc . get_object_with_rights :: < Process > ( proc_handle , Rights :: WRITE ) ? ; let thread = proc . get_object_with_rights :: < Thread > ( thread_handle , Rights :: WRITE ) ? ; if ! Arc :: ptr_eq ( thread . proc ( ) , & process ) { return Err ( ZxError :: ACCESS_DENIED ) ; } let arg1 = if arg1_handle != INVALID_HANDLE { let arg1 = proc . remove_handle ( arg1_handle ) ? ; if ! arg1 . rights . contains ( Rights :: TRANSFER ) { return Err ( ZxError :: ACCESS_DENIED ) ; } Some ( arg1 ) } else { None } ; process . start ( & thread , entry , stack , arg1 , arg2 , self . thread_fn ) ? ; Ok ( ( ) ) }
Start execution on a process.
Start execution on a process .
&self
proc_handle
HandleValue
thread_handle
HandleValue
entry
usize
stack
usize
arg1_handle
HandleValue
arg2
usize
&self
proc_handle
HandleValue
thread_handle
HandleValue
entry
usize
stack
usize
arg1_handle
HandleValue
arg2
usize