pub fn new(pid: LTerm, _parent_pid: LTerm, mfarity: &MFArity,
             prio: scheduler::Prio, code_server: &mut CodeServer) -> Hopefully<Process> {
    assert!(pid.is_local_pid());
    assert!(_parent_pid.is_local_pid() || _parent_pid.is_nil());

    // Process must start with some code location
    match code_server.lookup_and_load(mfarity) {
      Ok(ip) => {
        let p = Process {
          pid,
          //parent_pid: nil(),
          prio,
          current_queue: scheduler::Queue::None,
          timeslice_result: scheduler::SliceResult::None,
          heap: Heap::new(DEFAULT_PROC_HEAP),

          context: runtime_ctx::Context::new(ip),
          live: 0,

          error: ProcessError::None,
        };
        Ok(p)
        //Ok(sync::Arc::new(sync::RwLock::new(p)))
      },
      Err(e) => Err(e)
    }
  }
// Call this only from VM, the new process must be immediately registered
// in proc registry for this VM
Call this only from VM, the new process must be immediately registered
in proc registry for this VM
Call this only from VM the new process must be immediately registered in proc registry for this VM
pub fn new(pid: LTerm, _parent_pid: LTerm, mfarity: &MFArity,
             prio: scheduler::Prio, code_server: &mut CodeServer) -> Hopefully<Process> {
    assert!(pid.is_local_pid());
    assert!(_parent_pid.is_local_pid() || _parent_pid.is_nil());
    // Process must start with some code location
    match code_server.lookup_and_load(mfarity) {
      Ok(ip) => {
        let p = Process {
          pid,
          //parent_pid: nil(),
          prio,
          current_queue: scheduler::Queue::None,
          timeslice_result: scheduler::SliceResult::None,
          heap: Heap::new(DEFAULT_PROC_HEAP),
          context: runtime_ctx::Context::new(ip),
          live: 0,
          error: ProcessError::None,
        };
        Ok(p)
        //Ok(sync::Arc::new(sync::RwLock::new(p)))
      },
      Err(e) => Err(e)
    }
  }
pub fn new ( pid : LTerm , _parent_pid : LTerm , mfarity : & MFArity , prio : scheduler :: Prio , code_server : & mut CodeServer ) -> Hopefully < Process > { assert ! ( pid is_local_pid ( ) ) ; assert ! ( _parent_pid is_local_pid ( ) _parent_pid is_nil ( ) ) ; // Process must start with some code location match code_server . lookup_and_load ( mfarity ) { Ok ( ip ) => { let p = Process { pid , //parent_pid: nil(), prio , current_queue : scheduler :: Queue :: None , timeslice_result : scheduler :: SliceResult :: None , heap : Heap :: new ( DEFAULT_PROC_HEAP ) , context : runtime_ctx :: Context :: new ( ip ) , live : 0 , error : ProcessError :: None , } ; Ok ( p ) //Ok(sync::Arc::new(sync::RwLock::new(p))) } , Err ( e ) => Err ( e ) } }
Call this only from VM, the new process must be immediately registered
in proc registry for this VM
Call this only from VM the new process must be immediately registered in proc registry for this VM
pid
LTerm
_parent_pid
LTerm
mfarity
&MFArity
prio
scheduler::Prio
code_server
&mut CodeServer