Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The default alias name is now build from the name of the host of the process and...
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 11 Aug 2008 12:09:46 +0000 (12:09 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 11 Aug 2008 12:09:46 +0000 (12:09 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5891 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/java/simgrid/msg/Process.java

index 6c4bf5a..740b38e 100644 (file)
@@ -343,7 +343,7 @@ public abstract class Process extends Thread {
     /**
      * This method runs the process. Il calls the method function that you must overwrite.
      */
     /**
      * This method runs the process. Il calls the method function that you must overwrite.
      */
-  public synchronized void run() {
+  public /*synchronized*/ void run() {
 
       String[]args = null;      /* do not fill it before the signal or this.args will be empty */
 
 
       String[]args = null;      /* do not fill it before the signal or this.args will be empty */
 
@@ -445,14 +445,14 @@ public abstract class Process extends Thread {
   /** Send the given task in the mailbox associated with the default alias  (defaultAlias = "hostName:processName") */
   public void taskSend(Task task) throws NativeException, JniException {
        
   /** Send the given task in the mailbox associated with the default alias  (defaultAlias = "hostName:processName") */
   public void taskSend(Task task) throws NativeException, JniException {
        
-       String alias = Host.currentHost().getName() + ":" + this.msgName();
+       String alias = this.getHost().getName() + ":" + this.msgName();
     MsgNative.taskSend(alias, task, -1);
   }
   
   /** Send the given task in the mailbox associated with the default alias (waiting at most given time) */
   public void taskSend(Task task, double timeout) throws NativeException, JniException {
        
     MsgNative.taskSend(alias, task, -1);
   }
   
   /** Send the given task in the mailbox associated with the default alias (waiting at most given time) */
   public void taskSend(Task task, double timeout) throws NativeException, JniException {
        
-       String alias = Host.currentHost().getName() + ":" + this.msgName();
+       String alias = this.getHost().getName() + ":" + this.msgName();
     MsgNative.taskSend(alias, task, timeout);
   }
   
     MsgNative.taskSend(alias, task, timeout);
   }
   
@@ -466,7 +466,7 @@ public abstract class Process extends Thread {
   /** Receive a task on mailbox associated with the default alias */
    public Task taskReceive() throws NativeException,
     JniException {
   /** Receive a task on mailbox associated with the default alias */
    public Task taskReceive() throws NativeException,
     JniException {
-    String alias = Host.currentHost().getName() + ":" + this.msgName();
+    String alias = this.getHost().getName() + ":" + this.msgName();
     return MsgNative.taskReceive(alias, -1.0, null);
   }
   
     return MsgNative.taskReceive(alias, -1.0, null);
   }
   
@@ -480,7 +480,7 @@ public abstract class Process extends Thread {
   /** Receive a task on mailbox associated with the default alias (waiting at most given time) */
    public Task taskReceive(double timeout) throws NativeException,
     JniException {
   /** Receive a task on mailbox associated with the default alias (waiting at most given time) */
    public Task taskReceive(double timeout) throws NativeException,
     JniException {
-    String alias = Host.currentHost().getName() + ":" + this.msgName();
+    String alias = this.getHost().getName() + ":" + this.msgName();
     return MsgNative.taskReceive(alias, timeout, null);
   }
   
     return MsgNative.taskReceive(alias, timeout, null);
   }
   
@@ -494,7 +494,7 @@ public abstract class Process extends Thread {
   /** Receive a task on mailbox associated with the default alias from given sender  (waiting at most given time) */
   public Task taskReceive(double timeout, Host host) throws NativeException,
     JniException {
   /** Receive a task on mailbox associated with the default alias from given sender  (waiting at most given time) */
   public Task taskReceive(double timeout, Host host) throws NativeException,
     JniException {
-    String alias = Host.currentHost().getName() + ":" + this.msgName();
+    String alias = this.getHost().getName() + ":" + this.msgName();
     return MsgNative.taskReceive(alias, timeout, host);
   }
   
     return MsgNative.taskReceive(alias, timeout, host);
   }
   
@@ -507,7 +507,7 @@ public abstract class Process extends Thread {
    /** Receive a task on mailbox associated with the default alias from given sender */
    public Task taskReceive( Host host) throws NativeException,
     JniException {
    /** Receive a task on mailbox associated with the default alias from given sender */
    public Task taskReceive( Host host) throws NativeException,
     JniException {
-       String alias = Host.currentHost().getName() + ":" + this.msgName();
+       String alias = this.getHost().getName() + ":" + this.msgName();
     return MsgNative.taskReceive(alias, -1.0, host);
   }
 }
     return MsgNative.taskReceive(alias, -1.0, host);
   }
 }