Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move some functions from MsgNative to Task, to make one less call
authorSamuel Lepetit <samuel.lepetit@inria.fr>
Fri, 4 May 2012 14:24:59 +0000 (16:24 +0200)
committerSamuel Lepetit <samuel.lepetit@inria.fr>
Fri, 4 May 2012 14:24:59 +0000 (16:24 +0200)
org/simgrid/msg/MsgNative.java
org/simgrid/msg/Task.java
src/jmsg.c
src/jmsg.h
src/jmsg_comm.c
src/jmsg_task.c
src/jmsg_task.h

index 3c11df8..c93dd88 100644 (file)
@@ -264,28 +264,6 @@ final class MsgNative {
         * The natively implemented methods connected to the MSG task     *
         ******************************************************************/
 
         * The natively implemented methods connected to the MSG task     *
         ******************************************************************/
 
-       /**
-        * The natively implemented method to create a MSG task.
-        *
-        * @param name            The name of th task.
-        * @param computeDuration    A value of the processing amount (in flop) needed 
-        *                        to process the task. If 0, then it cannot be executed
-        *                        with the execute() method. This value has to be >= 0.
-        * @param messageSize        A value of amount of data (in bytes) needed to transfert 
-        *                        this task. If 0, then it cannot be transfered this task. 
-        *                        If 0, then it cannot be transfered with the get() and put() 
-        *                        methods. This value has to be >= 0.
-        * @param task            The java task object to bind with the native task to create.
-        *
-        * @exception             IllegalArgumentException if compute duration <0 or message size <0
-        *
-        * @see                    Task.create()
-        */
-       final static native void taskCreate(Task task, String name,
-                       double computeDuration,
-                       double messageSize)
-       throws IllegalArgumentException;
-
        /**
         * The natively implemented method to get the sender of a task.
         *
        /**
         * The natively implemented method to get the sender of a task.
         *
@@ -330,23 +308,6 @@ final class MsgNative {
         */
        final static native void taskCancel(Task task);
 
         */
        final static native void taskCancel(Task task);
 
-       /**
-        * The natively implemented method to create a MSG parallel task.
-        *
-        * @param name                The name of the parallel task.
-        * @param hosts                The list of hosts implied by the parallel task.
-        * @param computeDurations    The total number of operations that have to be performed
-        *                            on the hosts.
-        * @param messageSizes        An array of doubles
-        *
-        * @see                        ParallelTask.create()
-        */
-       final static native void parallelTaskCreate(Task pTask, String name,
-                       Host[]hosts,
-                       double[]computeDurations,
-                       double[]messageSizes)
-       throws NullPointerException, IllegalArgumentException;
-
        /**
         * The natively implemented method to get the computing amount of the task.
         *
        /**
         * The natively implemented method to get the computing amount of the task.
         *
@@ -380,16 +341,6 @@ final class MsgNative {
         */
        final static native void taskSetPriority(Task task, double priority);
 
         */
        final static native void taskSetPriority(Task task, double priority);
 
-       /**
-        * The natively implemented method to destroy a MSG task.
-        *
-        * @param                    The task to destroy.
-        *
-        *
-        * @see                    Task.destroy()
-        */
-       final static native void taskDestroy(Task task) ;
-
        /**
         * The natively implemented method to execute a MSG task.
         *
        /**
         * The natively implemented method to execute a MSG task.
         *
index 393b2e7..441ccb7 100644 (file)
@@ -27,8 +27,9 @@ public class Task {
 
        /** Default constructor (all fields to 0 or null) */
        public Task() {
 
        /** Default constructor (all fields to 0 or null) */
        public Task() {
-               MsgNative.taskCreate(this, null, 0, 0);
+               create(null, 0, 0);
        }
        }
+
        /* *              * *
         * * Constructors * *
         * *              * */
        /* *              * *
         * * Constructors * *
         * *              * */
@@ -47,7 +48,7 @@ public class Task {
         *                              This value has to be >= 0.
         */ 
        public Task(String name, double computeDuration, double messageSize) {
         *                              This value has to be >= 0.
         */ 
        public Task(String name, double computeDuration, double messageSize) {
-               MsgNative.taskCreate(this, name, computeDuration, messageSize);
+               create(name, computeDuration, messageSize);
        }
        /**
         * Construct an new parallel task with the specified processing amount and amount for each host
        }
        /**
         * Construct an new parallel task with the specified processing amount and amount for each host
@@ -59,17 +60,49 @@ public class Task {
         * @param messageSizes  A matrix describing the amount of data to exchange between hosts.
         */ 
        public Task(String name, Host[]hosts, double[]computeDurations, double[]messageSizes) {
         * @param messageSizes  A matrix describing the amount of data to exchange between hosts.
         */ 
        public Task(String name, Host[]hosts, double[]computeDurations, double[]messageSizes) {
-               MsgNative.parallelTaskCreate(this, name, hosts, computeDurations, messageSizes);
+               parallelCreate(name, hosts, computeDurations, messageSizes);
        }
        }
+       
+       /**
+        * The natively implemented method to create a MSG task.
+        *
+        * @param name            The name of th task.
+        * @param computeDuration    A value of the processing amount (in flop) needed 
+        *                        to process the task. If 0, then it cannot be executed
+        *                        with the execute() method. This value has to be >= 0.
+        * @param messageSize        A value of amount of data (in bytes) needed to transfert 
+        *                        this task. If 0, then it cannot be transfered this task. 
+        *                        If 0, then it cannot be transfered with the get() and put() 
+        *                        methods. This value has to be >= 0.
+        * @exception             IllegalArgumentException if compute duration <0 or message size <0
+        */
+       final native void create(String name,
+                       double computeDuration,
+                       double messageSize)
+       throws IllegalArgumentException;                
+       /**
+        * The natively implemented method to create a MSG parallel task.
+        *
+        * @param name                The name of the parallel task.
+        * @param hosts                The list of hosts implied by the parallel task.
+        * @param computeDurations    The total number of operations that have to be performed
+        *                            on the hosts.
+        * @param messageSizes        An array of doubles
+        *
+        */
+       final native void parallelCreate(String name,
+                       Host[]hosts,
+                       double[]computeDurations,
+                       double[]messageSizes)
+       throws NullPointerException, IllegalArgumentException;
        /* *                   * *
         * * Getters / Setters * *
         * *                   * */
     /** Gets the name of a task
        /* *                   * *
         * * Getters / Setters * *
         * *                   * */
     /** Gets the name of a task
+     * FIXME: Cache it.
      * @return
      */
      * @return
      */
-       public String getName() {
-               return MsgNative.taskGetName(this);
-       }
+       public native String getName();
        /** Gets the sender of the task */ 
        Process getSender() {
                return MsgNative.taskGetSender(this);
        /** Gets the sender of the task */ 
        Process getSender() {
                return MsgNative.taskGetSender(this);
@@ -133,10 +166,12 @@ public class Task {
         * @exception                   NativeException if the destruction failed.
         */ 
        protected void finalize() throws NativeException {
         * @exception                   NativeException if the destruction failed.
         */ 
        protected void finalize() throws NativeException {
-               if (this.bind != 0)
-                       MsgNative.taskDestroy(this);
+               destroy();
        }
        }
-
+       /**
+        * The natively implemented method to destroy a MSG task.
+        */
+       protected native void destroy();
 
        /** Send the task asynchronously on the mailbox identified by the specified name, 
         *  with no way to retrieve whether the communication succeeded or not
 
        /** Send the task asynchronously on the mailbox identified by the specified name, 
         *  with no way to retrieve whether the communication succeeded or not
index bc81dc2..87706b5 100644 (file)
@@ -513,136 +513,6 @@ Java_org_simgrid_msg_MsgNative_hostIsAvail(JNIEnv * env, jclass cls,
  * The MSG task connected functions implementation.                                    *
  ***************************************************************************************/
 
  * The MSG task connected functions implementation.                                    *
  ***************************************************************************************/
 
-JNIEXPORT void JNICALL
-Java_org_simgrid_msg_MsgNative_taskCreate(JNIEnv * env, jclass cls,
-                                      jobject jtask, jstring jname,
-                                      jdouble jcomputeDuration,
-                                      jdouble jmessageSize)
-{
-  m_task_t task;                /* the native task to create                            */
-  const char *name = NULL;      /* the name of the task                                 */
-
-  if (jcomputeDuration < 0) {
-    jxbt_throw_illegal(env,
-                       bprintf
-                       ("Task ComputeDuration (%f) cannot be negative",
-                        (double) jcomputeDuration));
-    return;
-  }
-
-  if (jmessageSize < 0) {
-    jxbt_throw_illegal(env,
-                       bprintf("Task MessageSize (%f) cannot be negative",
-                               (double) jmessageSize));
-    return;
-  }
-
-  if (jname) {
-    /* get the C string from the java string */
-    name = (*env)->GetStringUTFChars(env, jname, 0);
-  }
-
-
-  /* create the task */
-  task =
-      MSG_task_create(name, (double) jcomputeDuration,
-                      (double) jmessageSize, NULL);
-  if (jname)
-    (*env)->ReleaseStringUTFChars(env, jname, name);
-
-  /* bind & store the task */
-  jtask_bind(jtask, task, env);
-  MSG_task_set_data(task, jtask);
-}
-
-JNIEXPORT void JNICALL
-Java_org_simgrid_msg_MsgNative_parallel_taskCreate(JNIEnv * env, jclass cls,
-                                               jobject jtask,
-                                               jstring jname,
-                                               jobjectArray jhosts,
-                                               jdoubleArray
-                                               jcomputeDurations_arg,
-                                               jdoubleArray
-                                               jmessageSizes_arg)
-{
-
-  m_task_t task;                /* the native parallel task to create           */
-  const char *name;             /* the name of the task                         */
-  int host_count;
-  m_host_t *hosts;
-  double *computeDurations;
-  double *messageSizes;
-  jdouble *jcomputeDurations;
-  jdouble *jmessageSizes;
-
-  jobject jhost;
-  int index;
-
-
-  if (!jcomputeDurations_arg) {
-    jxbt_throw_null(env,
-                    xbt_strdup
-                    ("Parallel task compute durations cannot be null"));
-    return;
-  }
-
-  if (!jmessageSizes_arg) {
-    jxbt_throw_null(env,
-                    xbt_strdup
-                    ("Parallel task message sizes cannot be null"));
-    return;
-  }
-
-  if (!jname) {
-    jxbt_throw_null(env, xbt_strdup("Parallel task name cannot be null"));
-    return;
-  }
-
-  host_count = (int) (*env)->GetArrayLength(env, jhosts);
-
-
-  hosts = xbt_new0(m_host_t, host_count);
-  computeDurations = xbt_new0(double, host_count);
-  messageSizes = xbt_new0(double, host_count * host_count);
-
-  jcomputeDurations =
-      (*env)->GetDoubleArrayElements(env, jcomputeDurations_arg, 0);
-  jmessageSizes =
-      (*env)->GetDoubleArrayElements(env, jmessageSizes_arg, 0);
-
-  for (index = 0; index < host_count; index++) {
-    jhost = (*env)->GetObjectArrayElement(env, jhosts, index);
-    hosts[index] = jhost_get_native(env, jhost);
-    computeDurations[index] = jcomputeDurations[index];
-  }
-  for (index = 0; index < host_count * host_count; index++) {
-    messageSizes[index] = jmessageSizes[index];
-  }
-
-  (*env)->ReleaseDoubleArrayElements(env, jcomputeDurations_arg,
-                                     jcomputeDurations, 0);
-  (*env)->ReleaseDoubleArrayElements(env, jmessageSizes_arg, jmessageSizes,
-                                     0);
-
-
-  /* get the C string from the java string */
-  name = (*env)->GetStringUTFChars(env, jname, 0);
-
-  task =
-      MSG_parallel_task_create(name, host_count, hosts, computeDurations,
-                               messageSizes, NULL);
-
-  (*env)->ReleaseStringUTFChars(env, jname, name);
-
-  /* associate the java task object and the native task */
-  jtask_bind(jtask, task, env);
-
-  MSG_task_set_data(task, (void *) jtask);
-
-  if (!MSG_task_get_data(task))
-    jxbt_throw_jni(env, "global ref allocation failed");
-}
-
 JNIEXPORT jobject JNICALL
 Java_org_simgrid_msg_MsgNative_taskGetSender(JNIEnv * env, jclass cls,
                                          jobject jtask)
 JNIEXPORT jobject JNICALL
 Java_org_simgrid_msg_MsgNative_taskGetSender(JNIEnv * env, jclass cls,
                                          jobject jtask)
@@ -754,23 +624,6 @@ Java_org_simgrid_msg_MsgNative_taskSetPriority(JNIEnv * env, jclass cls,
   MSG_task_set_priority(task, (double) priority);
 }
 
   MSG_task_set_priority(task, (double) priority);
 }
 
-JNIEXPORT void JNICALL
-Java_org_simgrid_msg_MsgNative_taskDestroy(JNIEnv * env, jclass cls,
-                                       jobject jtask_arg)
-{
-  /* get the native task */
-  m_task_t task = jtask_to_native_task(jtask_arg, env);
-
-  if (!task) {
-    jxbt_throw_notbound(env, "task", task);
-    return;
-  }
-  MSG_error_t rv = MSG_task_destroy(task);
-
-  jxbt_check_res("MSG_task_destroy()", rv, MSG_OK,
-                 bprintf("unexpected error , please report this bug"));
-}
-
 JNIEXPORT void JNICALL
 Java_org_simgrid_msg_MsgNative_taskExecute(JNIEnv * env, jclass cls,
                                        jobject jtask)
 JNIEXPORT void JNICALL
 Java_org_simgrid_msg_MsgNative_taskExecute(JNIEnv * env, jclass cls,
                                        jobject jtask)
index 9fdbaeb..d5a231f 100644 (file)
@@ -189,19 +189,6 @@ Java_org_simgrid_msg_MsgNative_hostGetLoad(JNIEnv * env, jclass cls,
 JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_MsgNative_hostIsAvail
     (JNIEnv *, jclass, jobject);
 
 JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_MsgNative_hostIsAvail
     (JNIEnv *, jclass, jobject);
 
-/*
- * Class               simgrid_msg_Msg
- * Method              taskCreate
- * Signature   (Lsimgrid/msg/Task;Ljava/lang/String;DD)V
- */
-JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_taskCreate
-    (JNIEnv *, jclass, jobject, jstring, jdouble, jdouble);
-
-JNIEXPORT void JNICALL
-Java_org_simgrid_msg_MsgNative_parallel_taskCreate(JNIEnv *, jclass, jobject,
-                                               jstring, jobjectArray,
-                                               jdoubleArray, jdoubleArray);
-
 /*
  * Class               simgrid_msg_Msg
  * Method              taskGetSender
 /*
  * Class               simgrid_msg_Msg
  * Method              taskGetSender
@@ -259,14 +246,6 @@ Java_org_simgrid_msg_MsgNative_taskGetRemainingDuration(JNIEnv *, jclass,
 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_taskSetPriority
     (JNIEnv *, jclass, jobject, jdouble);
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_taskSetPriority
     (JNIEnv *, jclass, jobject, jdouble);
 
-/*
- * Class               simgrid_msg_Msg
- * Method              taskDestroy
- * Signature   (Lsimgrid/msg/Task;)V
- */
-JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_taskDestroy
-    (JNIEnv *, jclass, jobject);
-
 /*
  * Class               simgrid_msg_Msg
  * Method              taskExecute
 /*
  * Class               simgrid_msg_Msg
  * Method              taskExecute
index 374461f..7ea8c1b 100644 (file)
@@ -66,9 +66,7 @@ Java_org_simgrid_msg_Comm_unbind(JNIEnv *env, jobject jcomm) {
        m_task_t *task_received;
 
        task_received = (m_task_t*)  (long) (*env)->GetLongField(env, jcomm, jcomm_field_Comm_taskBind);
        m_task_t *task_received;
 
        task_received = (m_task_t*)  (long) (*env)->GetLongField(env, jcomm, jcomm_field_Comm_taskBind);
-       if (task_received != NULL) {
-               xbt_free(task_received);
-       }
+       xbt_free(task_received);
 
        comm = (msg_comm_t) (long) (*env)->GetLongField(env, jcomm, jcomm_field_Comm_bind);
        MSG_comm_destroy(comm);
 
        comm = (msg_comm_t) (long) (*env)->GetLongField(env, jcomm, jcomm_field_Comm_bind);
        MSG_comm_destroy(comm);
index 20c560e..573a2dc 100644 (file)
@@ -9,6 +9,7 @@
 #include "jmsg.h"
 #include "jmsg_task.h"
 #include "jxbt_utilities.h"
 #include "jmsg.h"
 #include "jmsg_task.h"
 #include "jxbt_utilities.h"
+#include "jmsg_host.h"
 
 #include <msg/msg.h>
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
 
 #include <msg/msg.h>
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
@@ -47,6 +48,148 @@ Java_org_simgrid_msg_Task_nativeInit(JNIEnv *env, jclass cls) {
        jtask_field_Comm_receiving = jxbt_get_sfield(env, "org/simgrid/msg/Comm", "receiving", "Z");
 }
 
        jtask_field_Comm_receiving = jxbt_get_sfield(env, "org/simgrid/msg/Comm", "receiving", "Z");
 }
 
+JNIEXPORT void JNICALL
+Java_org_simgrid_msg_Task_create(JNIEnv * env,
+                                      jobject jtask, jstring jname,
+                                      jdouble jcomputeDuration,
+                                      jdouble jmessageSize)
+{
+  m_task_t task;                /* the native task to create                            */
+  const char *name = NULL;      /* the name of the task                                 */
+
+  if (jcomputeDuration < 0) {
+    jxbt_throw_illegal(env,
+                       bprintf
+                       ("Task ComputeDuration (%f) cannot be negative",
+                        (double) jcomputeDuration));
+    return;
+  }
+
+  if (jmessageSize < 0) {
+    jxbt_throw_illegal(env,
+                       bprintf("Task MessageSize (%f) cannot be negative",
+                               (double) jmessageSize));
+    return;
+  }
+
+  if (jname) {
+    /* get the C string from the java string */
+    name = (*env)->GetStringUTFChars(env, jname, 0);
+  }
+
+
+  /* create the task */
+  task =
+      MSG_task_create(name, (double) jcomputeDuration,
+                      (double) jmessageSize, NULL);
+  if (jname)
+    (*env)->ReleaseStringUTFChars(env, jname, name);
+
+  /* bind & store the task */
+  jtask_bind(jtask, task, env);
+  MSG_task_set_data(task, jtask);
+}
+
+JNIEXPORT void JNICALL
+Java_org_simgrid_msg_Task_parallelCreate(JNIEnv * env,
+                                               jobject jtask,
+                                               jstring jname,
+                                               jobjectArray jhosts,
+                                               jdoubleArray
+                                               jcomputeDurations_arg,
+                                               jdoubleArray
+                                               jmessageSizes_arg) {
+
+  m_task_t task;                /* the native parallel task to create           */
+  const char *name;             /* the name of the task                         */
+  int host_count;
+  m_host_t *hosts;
+  double *computeDurations;
+  double *messageSizes;
+  jdouble *jcomputeDurations;
+  jdouble *jmessageSizes;
+
+  jobject jhost;
+  int index;
+
+
+  if (!jcomputeDurations_arg) {
+    jxbt_throw_null(env,
+                    xbt_strdup
+                    ("Parallel task compute durations cannot be null"));
+    return;
+  }
+
+  if (!jmessageSizes_arg) {
+    jxbt_throw_null(env,
+                    xbt_strdup
+                    ("Parallel task message sizes cannot be null"));
+    return;
+  }
+
+  if (!jname) {
+    jxbt_throw_null(env, xbt_strdup("Parallel task name cannot be null"));
+    return;
+  }
+
+  host_count = (int) (*env)->GetArrayLength(env, jhosts);
+
+
+  hosts = xbt_new0(m_host_t, host_count);
+  computeDurations = xbt_new0(double, host_count);
+  messageSizes = xbt_new0(double, host_count * host_count);
+
+  jcomputeDurations =
+      (*env)->GetDoubleArrayElements(env, jcomputeDurations_arg, 0);
+  jmessageSizes =
+      (*env)->GetDoubleArrayElements(env, jmessageSizes_arg, 0);
+
+  for (index = 0; index < host_count; index++) {
+    jhost = (*env)->GetObjectArrayElement(env, jhosts, index);
+    hosts[index] = jhost_get_native(env, jhost);
+    computeDurations[index] = jcomputeDurations[index];
+  }
+  for (index = 0; index < host_count * host_count; index++) {
+    messageSizes[index] = jmessageSizes[index];
+  }
+
+  (*env)->ReleaseDoubleArrayElements(env, jcomputeDurations_arg,
+                                     jcomputeDurations, 0);
+  (*env)->ReleaseDoubleArrayElements(env, jmessageSizes_arg, jmessageSizes,
+                                     0);
+
+
+  /* get the C string from the java string */
+  name = (*env)->GetStringUTFChars(env, jname, 0);
+
+  task =
+      MSG_parallel_task_create(name, host_count, hosts, computeDurations,
+                               messageSizes, NULL);
+
+  (*env)->ReleaseStringUTFChars(env, jname, name);
+
+  /* associate the java task object and the native task */
+  jtask_bind(jtask, task, env);
+
+  MSG_task_set_data(task, (void *) jtask);
+
+  if (!MSG_task_get_data(task))
+    jxbt_throw_jni(env, "global ref allocation failed");
+}
+
+JNIEXPORT jstring JNICALL
+Java_org_simgrid_msg_Task_getName(JNIEnv * env,
+                                       jobject jtask) {
+  m_task_t task = jtask_to_native_task(jtask, env);
+
+  if (!task) {
+    jxbt_throw_notbound(env, "task", jtask);
+    return NULL;
+  }
+
+  return (*env)->NewStringUTF(env, MSG_task_get_name(task));
+}
+
 JNIEXPORT jobject JNICALL
 Java_org_simgrid_msg_Task_irecv(JNIEnv * env, jclass cls, jstring jmailbox) {
        msg_comm_t comm;
 JNIEXPORT jobject JNICALL
 Java_org_simgrid_msg_Task_irecv(JNIEnv * env, jclass cls, jstring jmailbox) {
        msg_comm_t comm;
index 08771f4..53c11a3 100644 (file)
@@ -74,13 +74,57 @@ m_task_t jtask_to_native_task(jobject jtask, JNIEnv * env);
  *                                             Otherwise the function returns false.
  */
 jboolean jtask_is_valid(jobject jtask, JNIEnv * env);
  *                                             Otherwise the function returns false.
  */
 jboolean jtask_is_valid(jobject jtask, JNIEnv * env);
+/*
+ * Class               org_simgrid_msg_Task
+ * Method              create
+ */
+JNIEXPORT void JNICALL
+Java_org_simgrid_msg_Task_create
+               (JNIEnv * env, jobject jtask, jstring jname, jdouble jcomputeDuration, jdouble jmessageSize);
+/*
+ * Class               org_simgrid_msg_Task
+ * Method              parallelCreate
+ */
+JNIEXPORT void JNICALL
+Java_org_simgrid_msg_Task_parallelCreate
+               (JNIEnv *, jobject,
+     jstring, jobjectArray,
+     jdoubleArray,
+     jdoubleArray);
+/*
+ * Class               org_simgrid_msg_Task
+ * Method              destroy
+ * Signature   (Lsimgrid/msg/Task;)V
+ */
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_destroy
+    (JNIEnv *, jobject);
+/*
+ * Class               org_simgrid_msg_Task
+ * Method              getName
+ * Signature   ()Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_org_simgrid_msg_Task_getName
+    (JNIEnv *, jobject);
 
 
+/*
+ * Class               org_simgrid_msg_Task
+ * Method              nativeInit
+ * Signature   ();
+ */
 JNIEXPORT void JNICALL
 Java_org_simgrid_msg_Task_nativeInit(JNIEnv *env, jclass cls);
 JNIEXPORT void JNICALL
 Java_org_simgrid_msg_Task_nativeInit(JNIEnv *env, jclass cls);
-
+/**
+ * Class               org_simgrid_msg_Task
+ * Method              irecv
+ * Signature   (Ljava/lang/String;)Lorg/simgrid/msg/Comm;
+ */
 JNIEXPORT jobject JNICALL
 Java_org_simgrid_msg_Task_irecv(JNIEnv * env, jclass cls, jstring jmailbox);
 JNIEXPORT jobject JNICALL
 Java_org_simgrid_msg_Task_irecv(JNIEnv * env, jclass cls, jstring jmailbox);
-
+/**
+ * Class               org_simgrid_msg_Task
+ * Method              isend
+ * Signature   (Lorg/simgrid/msg/Task;Ljava/lang/String;)Lorg/simgrid/msg/Comm;
+ */
 JNIEXPORT jobject JNICALL
 Java_org_simgrid_msg_Task_isend(JNIEnv *env, jobject jtask, jstring jmailbox);
 
 JNIEXPORT jobject JNICALL
 Java_org_simgrid_msg_Task_isend(JNIEnv *env, jobject jtask, jstring jmailbox);