/// Creates a new process in the job associated with `kernel`.
///
/// # Parameters
/// - `kernel`: The kernel that is used to fetch the appropriate job to creat the process in.
/// - `pid`: The pid to give the created process' thread group.
/// - `name`: The name of the process.
///
/// Returns a thread in the created process, the thread group that contains the process, and a
/// memory manager to use for the returned thread.
Creates a new process in the job associated with `kernel`.
Creates a new process in the job associated with ` kernel ` .
pub fn create_zircon_process(
    kernel: &Arc<Kernel>,
    pid: pid_t,
    name: &CString,
) -> Result<(zx::Thread, Arc<ThreadGroup>, Arc<MemoryManager>), Errno> {
    let (process, root_vmar) = kernel
        .job
        .create_child_process(name.as_bytes())
        .map_err(|status| from_status_like_fdio!(status))?;
    let thread =
        process.create_thread(name.as_bytes()).map_err(|status| from_status_like_fdio!(status))?;
    let mm =
        Arc::new(MemoryManager::new(root_vmar).map_err(|status| from_status_like_fdio!(status))?);
    let thread_group = Arc::new(ThreadGroup::new(kernel.clone(), process, pid));
    Ok((thread, thread_group, mm))
}
pub fn create_zircon_process ( kernel : & Arc < Kernel > , pid : pid_t , name : & CString , ) -> Result < ( zx :: Thread , Arc < ThreadGroup > , Arc < MemoryManager > ) , Errno > { let ( process , root_vmar ) = kernel . job . create_child_process ( name . as_bytes ( ) ) . map_err ( | status | from_status_like_fdio ! ( status ) ) ? ; let thread = process . create_thread ( name . as_bytes ( ) ) . map_err ( | status | from_status_like_fdio ! ( status ) ) ? ; let mm = Arc :: new ( MemoryManager :: new ( root_vmar ) . map_err ( | status | from_status_like_fdio ! ( status ) ) ? ) ; let thread_group = Arc :: new ( ThreadGroup :: new ( kernel . clone ( ) , process , pid ) ) ; Ok ( ( thread , thread_group , mm ) ) }
Creates a new process in the job associated with `kernel`.
Creates a new process in the job associated with ` kernel ` .
kernel
&Arc<Kernel>
The kernel that is used to fetch the appropriate job to creat the process in.
The kernel that is used to fetch the appropriate job to creat the process in .
pid
pid_t
The pid to give the created process' thread group.
The pid to give the created process ' thread group .
name
&CString
The name of the process.

Returns a thread in the created process, the thread group that contains the process, and a
memory manager to use for the returned thread.
The name of the process . Returns a thread in the created process the thread group that contains the process and a memory manager to use for the returned thread .