From 901f9191ed3ea01f286189441081224571c3219c Mon Sep 17 00:00:00 2001 From: mquinson Date: Thu, 20 Sep 2007 16:06:20 +0000 Subject: [PATCH] Ops, there is some more s_host fields around git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4649 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/java/jmsg.c | 2 +- src/msg/gos.c | 14 +++++++------- src/msg/host.c | 6 +++--- src/msg/private.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/java/jmsg.c b/src/java/jmsg.c index 0063f41724..d27abbf43d 100644 --- a/src/java/jmsg.c +++ b/src/java/jmsg.c @@ -128,7 +128,7 @@ Java_simgrid_msg_Msg_processCreate(JNIEnv* env, jclass cls, jobject jprocess_arg 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); diff --git a/src/msg/gos.c b/src/msg/gos.c index 44c9783dc6..ef3c03b127 100644 --- a/src/msg/gos.c +++ b/src/msg/gos.c @@ -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); - 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; @@ -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-> - 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 */ @@ -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); - } 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; @@ -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); - 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; @@ -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); - } 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); @@ -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->host_list[i] = host_list[i]->simdata->s_host; + simdata->host_list[i] = host_list[i]->simdata->smx_host; return task; diff --git a/src/msg/host.c b/src/msg/host.c index f8f9cdf165..f11ea22603 100644 --- a/src/msg/host.c +++ b/src/msg/host.c @@ -41,7 +41,7 @@ m_host_t __MSG_host_create(smx_host_t workstation, void *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++) @@ -183,7 +183,7 @@ double MSG_get_host_speed(m_host_t h) { 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 @@ -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"); - return (SIMIX_host_get_state(h->simdata->s_host)); + return (SIMIX_host_get_state(h->simdata->smx_host)); } diff --git a/src/msg/private.h b/src/msg/private.h index 0641f9e0db..7032a3a9cc 100644 --- a/src/msg/private.h +++ b/src/msg/private.h @@ -24,7 +24,7 @@ /**************** 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 */ -- 2.20.1