pub fn sys_thread_create(
        &self,
        proc_handle: HandleValue,
        name: UserInPtr<u8>,
        name_size: usize,
        options: u32,
        mut thread_handle: UserOutPtr<HandleValue>,
    ) -> ZxResult {
        let name = name.read_string(name_size)?;
        info!(
            "thread.create: proc={:#x?}, name={:?}, options={:#x?}",
            proc_handle, name, options,
        );
        if options != 0 {
            return Err(ZxError::INVALID_ARGS);
        }
        let proc = self.thread.proc();
        let process = proc.get_object_with_rights::<Process>(proc_handle, Rights::MANAGE_THREAD)?;
        let thread = Thread::create(&process, &name)?;
        let handle = proc.add_handle(Handle::new(thread, Rights::DEFAULT_THREAD));
        thread_handle.write(handle)?;
        Ok(())
    }
/// Creates a thread within the specified process.
///
/// Upon success a handle for the new thread is returned.
Creates a thread within the specified process.
Upon success a handle for the new thread is returned.
Creates a thread within the specified process . Upon success a handle for the new thread is returned .
pub fn sys_thread_create(
        &self,
        proc_handle: HandleValue,
        name: UserInPtr<u8>,
        name_size: usize,
        options: u32,
        mut thread_handle: UserOutPtr<HandleValue>,
    ) -> ZxResult {
        let name = name.read_string(name_size)?;
        info!(
            "thread.create: proc={:#x?}, name={:?}, options={:#x?}",
            proc_handle, name, options,
        );
        if options != 0 {
            return Err(ZxError::INVALID_ARGS);
        }
        let proc = self.thread.proc();
        let process = proc.get_object_with_rights::<Process>(proc_handle, Rights::MANAGE_THREAD)?;
        let thread = Thread::create(&process, &name)?;
        let handle = proc.add_handle(Handle::new(thread, Rights::DEFAULT_THREAD));
        thread_handle.write(handle)?;
        Ok(())
    }
pub fn sys_thread_create ( & self , proc_handle : HandleValue , name : UserInPtr < u8 > , name_size : usize , options : u32 , mut thread_handle : UserOutPtr < HandleValue > , ) -> ZxResult { let name = name . read_string ( name_size ) ? ; info ! ( " " proc_handle name options ) ; if options != 0 { return Err ( ZxError :: INVALID_ARGS ) ; } let proc = self . thread . proc ( ) ; let process = proc . get_object_with_rights :: < Process > ( proc_handle , Rights :: MANAGE_THREAD ) ? ; let thread = Thread :: create ( & process , & name ) ? ; let handle = proc . add_handle ( Handle :: new ( thread , Rights :: DEFAULT_THREAD ) ) ; thread_handle . write ( handle ) ? ; Ok ( ( ) ) }
Creates a thread within the specified process.
Creates a thread within the specified process .
&self
proc_handle
HandleValue
name
UserInPtr<u8>
name_size
usize
options
u32
thread_handle
UserOutPtr<HandleValue>
&self
proc_handle
HandleValue
name
UserInPtr<u8>
name_size
usize
options
u32
thread_handle
UserOutPtr<HandleValue>