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;
/* 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_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;
}
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;
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);
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;
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++)
{
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
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));
}
/**************** 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 */