Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add checking on getSender/getSource to prevent a SEGFAULT
[simgrid.git] / org / simgrid / msg / MsgNative.java
index c93dd88..f6c28a9 100644 (file)
@@ -176,73 +176,6 @@ final class MsgNative {
         * The natively implemented methods connected to the MSG host     *
         ******************************************************************/
 
-       /**
-        * The natively implemented method to get an host from his name.
-        *
-        * @param name            The name of the host to get.
-        *
-        * @return                The host having the specified name.
-        *
-        * @exception            HostNotFoundException if there is no such host
-        *                       
-        *
-        * @see                Host.getByName()
-        */
-       final static native Host hostGetByName(String name) throws HostNotFoundException;
-
-       /**
-        * The natively implemented method to get the name of an MSG host.
-        *
-        * @param host            The host (valid) to get the name.
-        *
-        * @return                The name of the specified host.
-        *
-        * @see                Host.getName()
-        */
-       final static native String hostGetName(Host host);
-
-       /**
-        * The natively implemented method to get the number of hosts of the simulation.
-        *
-        * @return                The number of hosts of the simulation.
-        *
-        * @see                Host.getNumber()
-        */
-       final static native int hostGetCount();
-
-       /**
-        * The natively implemented method to get the host of the current runing process.
-        *
-        * @return                The host of the current running process.
-        *
-        * @see                Host.currentHost()
-        */
-       final static native Host hostSelf();
-
-       /**
-        * The natively implemented method to get the speed of a MSG host.
-        *
-        * @param host            The host to get the host.
-        *
-        * @return                The speed of the specified host.
-        *
-        * @see                Host.getSpeed()
-        */
-
-       final static native double hostGetSpeed(Host host);
-
-       /**
-        * The natively implemented native method to test if an host is avail.
-        *
-        * @param host            The host to test.
-        *
-        * @return                If the host is avail the method returns true. 
-        *                        Otherwise the method returns false.
-        *
-        * @see                Host.isAvail()
-        */
-       final static native boolean hostIsAvail(Host host);
-
        /**
         * The natively implemented native method to get all the hosts of the simulation.
         *
@@ -251,133 +184,4 @@ final class MsgNative {
 
        final static native Host[] allHosts();
 
-       /**
-        * The natively implemented native method to get the number of running tasks on a host.
-        *
-        * @param                The host concerned by the operation.
-        *
-        * @return                The number of running tasks.
-        */
-       final static native int hostGetLoad(Host host);
-
-       /******************************************************************
-        * The natively implemented methods connected to the MSG task     *
-        ******************************************************************/
-
-       /**
-        * The natively implemented method to get the sender of a task.
-        *
-        * @param    task            The task (valid) to get the sender.
-        *
-        * @return                The sender of the task.
-        *
-        * @see                    Task.getSender()
-        */
-       final static native Process taskGetSender(Task task);
-
-       /**
-        * The natively implementd method to get the source of a task.
-        *
-        * @param task            The task to get the source.
-        *
-        * @return                The source of the task.
-        *
-        *
-        * @see                    Task.getSource()
-        */
-       final static native Host taskGetSource(Task task);
-
-       /**
-        * The natively implemented method to get the name of the task.
-        *
-        * @param task            The task to get the name.
-        *
-        * @return                 The name of the specified task.
-        *
-        * @see                    Task.getName()
-        */
-       final static native String taskGetName(Task task);
-
-       /**
-        * The natively implemented method to cancel a task.
-        *
-        * @param task            The task to cancel.
-        *
-        *
-        * @see                    Task.cancel().
-        */
-       final static native void taskCancel(Task task);
-
-       /**
-        * The natively implemented method to get the computing amount of the task.
-        *
-        * @param task            The task to get the computing amount.
-        *
-        * @return                The computing amount of the specified task.
-        *
-        * @see                    Task.getComputeDuration()
-        */
-       final static native double taskGetComputeDuration(Task task);
-
-       /**
-        * The natively implemented method to get the remaining computation
-        *
-        * @param task            The task to get the remaining computation.
-        *
-        * @return                The remaining computation of the specified task.
-        *
-        * @see                    Task.getRemainingDuration()
-        */
-       final static native double taskGetRemainingDuration(Task task);
-
-       /**
-        * The natively implemented method to set the priority of a task.
-        *
-        * @param task            The task to set the priority
-        *
-        * @param priority        The new priority of the specified task.
-        *
-        * @see                    Task.setPriority()
-        */
-       final static native void taskSetPriority(Task task, double priority);
-
-       /**
-        * The natively implemented method to execute a MSG task.
-        *
-        * @param task            The task to execute.
-        *
-        * @exception             HostFailureException,TaskCancelledException on error in the C world
-        *
-        * @see                    Task.execute()
-        */
-       final static native void taskExecute(Task task) throws HostFailureException,TaskCancelledException;
-
-       /* ****************************************************************
-        * Communication methods thru mailboxes                           *
-        **************************************************************** */
-
-       final static native void taskSend(String alias, Task task, double timeout) throws TransferFailureException,HostFailureException,TimeoutException;
-       final static native Task taskReceive(String alias, double timeout, Host host) throws TransferFailureException,HostFailureException,TimeoutException;
-       final static native int taskListenFrom(String alias);
-       final static native boolean taskListen(String alias);
-       final static native int taskListenFromHost(String alias, Host host);
-
-       /* ***************************************************************
-        * Task sending methods                                          *
-        *************************************************************** */
-
-       /**
-        * The natively implemented method to send a task in a mailbox associated with an alias,  with a bounded transmition
-        * rate.
-        * 
-        * @param alias            The alias of the mailbox.
-        * @param task            The task to put.
-        * @param max_rate        The bounded transmition rate.
-        *
-        * @exception             NativeException on error in the C world
-        */ 
-       final static native void taskSendBounded(String alias, Task task, double maxrate) throws TransferFailureException,HostFailureException,TimeoutException;
-
-       final static native void taskDSend(String mailbox, Task task);
-
 }