Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ops, there is some more s_host fields around
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 20 Sep 2007 16:06:20 +0000 (16:06 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 20 Sep 2007 16:06:20 +0000 (16:06 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4649 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/java/jmsg.c
src/msg/gos.c
src/msg/host.c
src/msg/private.h

index 0063f41..d27abbf 100644 (file)
@@ -128,7 +128,7 @@ Java_simgrid_msg_Msg_processCreate(JNIEnv* env, jclass cls, jobject jprocess_arg
         env);
   
   SIMIX_jprocess_create(process->name,
         env);
   
   SIMIX_jprocess_create(process->name,
-                       process->simdata->m_host->simdata->s_host, 
+                       process->simdata->m_host->simdata->smx_host, 
                        /*data*/ (void*)process,
                        jprocess,env,
                        &process->simdata->s_process);
                        /*data*/ (void*)process,
                        jprocess,env,
                        &process->simdata->s_process);
index 44c9783..ef3c03b 100644 (file)
@@ -90,7 +90,7 @@ static MSG_error_t __MSG_task_get_with_time_out_from_host(m_task_t * task,
     else 
       SIMIX_cond_wait(h_simdata->sleeping[channel], h->simdata->mutex);
 
     else 
       SIMIX_cond_wait(h_simdata->sleeping[channel], h->simdata->mutex);
 
-    if (SIMIX_host_get_state(h_simdata->s_host) == 0)
+    if (SIMIX_host_get_state(h_simdata->smx_host) == 0)
       MSG_RETURN(MSG_HOST_FAILURE);
 
     first_time = 0;
       MSG_RETURN(MSG_HOST_FAILURE);
 
     first_time = 0;
@@ -114,8 +114,8 @@ static MSG_error_t __MSG_task_get_with_time_out_from_host(m_task_t * task,
   /* create SIMIX action to the communication */
   t_simdata->comm =
       SIMIX_action_communicate(t_simdata->sender->simdata->m_host->
   /* create SIMIX action to the communication */
   t_simdata->comm =
       SIMIX_action_communicate(t_simdata->sender->simdata->m_host->
-                              simdata->s_host,
-                              process->simdata->m_host->simdata->s_host,
+                              simdata->smx_host,
+                              process->simdata->m_host->simdata->smx_host,
                               t->name, t_simdata->message_size,
                               t_simdata->rate);
   /* if the process is suspend, create the action but stop its execution, it will be restart when the sender process resume */
                               t->name, t_simdata->message_size,
                               t_simdata->rate);
   /* if the process is suspend, create the action but stop its execution, it will be restart when the sender process resume */
@@ -151,7 +151,7 @@ static MSG_error_t __MSG_task_get_with_time_out_from_host(m_task_t * task,
     t_simdata->comm = NULL;
                t_simdata->using--;
     MSG_RETURN(MSG_OK);
     t_simdata->comm = NULL;
                t_simdata->using--;
     MSG_RETURN(MSG_OK);
-  } else if (SIMIX_host_get_state(h_simdata->s_host) == 0) {
+  } else if (SIMIX_host_get_state(h_simdata->smx_host) == 0) {
     //t_simdata->comm = NULL;
     SIMIX_action_destroy(t_simdata->comm);
     t_simdata->comm = NULL;
     //t_simdata->comm = NULL;
     SIMIX_action_destroy(t_simdata->comm);
     t_simdata->comm = NULL;
@@ -349,7 +349,7 @@ MSG_error_t MSG_channel_select_from(m_channel_t channel,
       }
       SIMIX_cond_destroy(cond);
       SIMIX_mutex_unlock(h_simdata->mutex);
       }
       SIMIX_cond_destroy(cond);
       SIMIX_mutex_unlock(h_simdata->mutex);
-      if (SIMIX_host_get_state(h_simdata->s_host) == 0) {
+      if (SIMIX_host_get_state(h_simdata->smx_host) == 0) {
        MSG_RETURN(MSG_HOST_FAILURE);
       }
       h_simdata->sleeping[channel] = NULL;
        MSG_RETURN(MSG_HOST_FAILURE);
       }
       h_simdata->sleeping[channel] = NULL;
@@ -535,7 +535,7 @@ MSG_error_t MSG_task_put_with_timeout(m_task_t task, m_host_t dest,
 
   if (SIMIX_action_get_state(task->simdata->comm) == SURF_ACTION_DONE) {
     MSG_RETURN(MSG_OK);
 
   if (SIMIX_action_get_state(task->simdata->comm) == SURF_ACTION_DONE) {
     MSG_RETURN(MSG_OK);
-  } else if (SIMIX_host_get_state(local_host->simdata->s_host) == 0) {
+  } else if (SIMIX_host_get_state(local_host->simdata->smx_host) == 0) {
     MSG_RETURN(MSG_HOST_FAILURE);
   } else {
     MSG_RETURN(MSG_TRANSFER_FAILURE);
     MSG_RETURN(MSG_HOST_FAILURE);
   } else {
     MSG_RETURN(MSG_TRANSFER_FAILURE);
@@ -702,7 +702,7 @@ m_task_t MSG_parallel_task_create(const char *name,
   simdata->comm_amount = communication_amount;
 
   for (i = 0; i < host_nb; i++)
   simdata->comm_amount = communication_amount;
 
   for (i = 0; i < host_nb; i++)
-    simdata->host_list[i] = host_list[i]->simdata->s_host;
+    simdata->host_list[i] = host_list[i]->simdata->smx_host;
 
   return task;
 
 
   return task;
 
index f8f9cdf..f11ea22 100644 (file)
@@ -41,7 +41,7 @@ m_host_t __MSG_host_create(smx_host_t workstation, void *data)
   host->simdata = simdata;
   host->data = data;
 
   host->simdata = simdata;
   host->data = data;
 
-  simdata->s_host = workstation;
+  simdata->smx_host = workstation;
 
   simdata->mbox = xbt_new0(xbt_fifo_t, msg_global->max_channel);
   for (i = 0; i < msg_global->max_channel; i++)
 
   simdata->mbox = xbt_new0(xbt_fifo_t, msg_global->max_channel);
   for (i = 0; i < msg_global->max_channel; i++)
@@ -183,7 +183,7 @@ double MSG_get_host_speed(m_host_t h)
 {
   xbt_assert0((h != NULL), "Invalid parameters");
 
 {
   xbt_assert0((h != NULL), "Invalid parameters");
 
-  return (SIMIX_host_get_speed(h->simdata->s_host));
+  return (SIMIX_host_get_speed(h->simdata->smx_host));
 }
 
 /** \ingroup msg_gos_functions
 }
 
 /** \ingroup msg_gos_functions
@@ -194,5 +194,5 @@ double MSG_get_host_speed(m_host_t h)
 int MSG_host_is_avail(m_host_t h)
 {
   xbt_assert0((h != NULL), "Invalid parameters");
 int MSG_host_is_avail(m_host_t h)
 {
   xbt_assert0((h != NULL), "Invalid parameters");
-  return (SIMIX_host_get_state(h->simdata->s_host));
+  return (SIMIX_host_get_state(h->simdata->smx_host));
 }
 }
index 0641f9e..7032a3a 100644 (file)
@@ -24,7 +24,7 @@
 /**************** datatypes **********************************/
 
 typedef struct simdata_host {
 /**************** datatypes **********************************/
 
 typedef struct simdata_host {
-  smx_host_t s_host;                   /* SURF modeling */
+  smx_host_t smx_host;                 /* SURF modeling */
   xbt_fifo_t *mbox;            /* array of FIFOs used as a mailboxes  */
   smx_cond_t *sleeping;        /* array of conditions on which the processes sleep if they are waiting for a communication on a channel */
        smx_mutex_t mutex; /* mutex to access the host */
   xbt_fifo_t *mbox;            /* array of FIFOs used as a mailboxes  */
   smx_cond_t *sleeping;        /* array of conditions on which the processes sleep if they are waiting for a communication on a channel */
        smx_mutex_t mutex; /* mutex to access the host */