Examples of EHandle


Examples of erjang.EHandle

  }

  @BIF
  public static EObject register(EObject name, EObject pid) {
    EAtom aname;
    EHandle handle = pid.testHandle();
    if ((aname=name.testAtom()) == null
        || handle == null) throw ERT.badarg(name, pid);
    ERT.register(aname, handle);
    return ERT.TRUE;
  }
View Full Code Here

Examples of erjang.EHandle

    throw new ErlangHalt();
  }
 
  @BIF
  public static EObject unlink(EProc self, EObject pid) throws Pausable {
    EHandle h = EHandle.cast(pid);
    if (h != null) {
      self.unlink(h);
    }
    return pid;
  }
View Full Code Here

Examples of erjang.EHandle

    return pid;
  }
 
  @BIF
  static public EObject link(EProc self, EObject pid) throws Pausable {
    EHandle h = EHandle.cast(pid);
    if (h == null) throw ERT.badarg(pid);
    self.link_to(h);
    return ERT.TRUE;
  }
View Full Code Here

Examples of erjang.EHandle

  static public EObject monitor(EProc self, EObject how, EObject object) throws Pausable {
    if (how != am_process)
      throw ERT.badarg(how, object);

    // case 1: object is a PID
    EHandle h = EHandle.cast(object);
    if (h != null)
    {  
      ERef ref = ERT.getLocalNode().createRef();
      if (!self.monitor(h, h, ref)) {
        self.mbox_send(ETuple.make(ERT.am_DOWN, ref, am_process, object, ERT.am_noproc));
View Full Code Here

Examples of erjang.EHandle

    if (found == null) {
      return ERT.FALSE;
    }
   
    EHandle h;
    ETuple tup;
    EAtom name;
    EAtom node;
    if ((h=found.testHandle()) != null) {
      h.remove_monitor(self.self_handle(), r, flush);
    } else if ((tup=found.testTuple()) != null
          && tup.arity()==2
          && (name=tup.elm(1).testAtom()) != null
          && (node=tup.elm(2).testAtom()) != null) {
     
View Full Code Here

Examples of erjang.EHandle

  @BIF
  public static EAtom exit(EProc proc, EObject p, EObject reason) throws Pausable {
   
//    System.err.println(proc.self_handle() + ":: erlang:exit(" + p + ", " + reason + ")");
   
    EHandle pid = p.testHandle();
   
    if (pid == null)
      throw ERT.badarg(p, reason);
 
    if (pid == proc.self_handle()) {
      throw new ErlangExit(reason, proc.self_handle());
    }
   
    pid.exit_signal(proc.self_handle(), reason, true);
   
    return ERT.TRUE;
  }
View Full Code Here

Examples of erjang.EHandle

   
    ERef ref;
    if ((ref=name.testReference()) != null)
      return ref.node();
   
    EHandle handle;
    if ((handle=name.testHandle()) != null)
      return handle.node();
   
    throw ERT.badarg(name);
  }
View Full Code Here

Examples of erjang.EHandle

   
    if (!ERT.getLocalNode().isALive()) {
      return ENode.am_nonode_at_nohost;
    }
   
    EHandle handle;
    if ((handle=name.testHandle()) != null) {
      return handle.node();
    }
   
    ERef ref;
    if ((ref=name.testReference()) != null) {
      return ref.node();
View Full Code Here

Examples of erjang.EHandle

          // {command, iodata()}
          // {connect, PID}

          if (cmd.elem1 == EPort.am_command) {
            if (cmd.elem2.collectIOList(out)) {
              EHandle caller = sender.testHandle();
             
              if (caller == null) {
                log.warning("*** sender is null? "+sender);
              }
             
View Full Code Here

Examples of erjang.EHandle

  }

  @Override
  public void processExit(ERef monitor) throws Pausable {

    EHandle who = driver_get_monitored_process(monitor);
    int state = this.state;

    if ((state & TCP_STATE_MULTI_ACCEPTING) == TCP_STATE_MULTI_ACCEPTING) {
      AsyncMultiOp op;
      if ((op = remove_multi_op(who))  == null){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.