Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use msg_task_t instead of m_task_t
authorSamuel Lepetit <samuel.lepetit@inria.fr>
Fri, 29 Jun 2012 09:39:13 +0000 (11:39 +0200)
committerSamuel Lepetit <samuel.lepetit@inria.fr>
Fri, 29 Jun 2012 10:01:15 +0000 (12:01 +0200)
44 files changed:
examples/msg/actions/actions.c
examples/msg/chord/chord.c
examples/msg/cloud/masterslave_virtual_machines.c
examples/msg/gtnets/gtnets.c
examples/msg/icomms/peer.c
examples/msg/icomms/peer2.c
examples/msg/icomms/peer3.c
examples/msg/masterslave/masterslave_arg.c
examples/msg/masterslave/masterslave_bypass.c
examples/msg/masterslave/masterslave_cluster.c
examples/msg/masterslave/masterslave_console.c
examples/msg/masterslave/masterslave_failure.c
examples/msg/masterslave/masterslave_forwarder.c
examples/msg/masterslave/masterslave_mailbox.c
examples/msg/migration/migration.c
examples/msg/ns3/ns3.c
examples/msg/parallel_task/parallel_task.c
examples/msg/parallel_task/test_ptask.c
examples/msg/pmm/msg_pmm.c
examples/msg/priority/priority.c
examples/msg/sendrecv/sendrecv.c
examples/msg/token_ring/ring_call.c
examples/msg/tracing/categories.c
examples/msg/tracing/link_srcdst_user_variables.c
examples/msg/tracing/link_user_variables.c
examples/msg/tracing/ms.c
examples/msg/tracing/procmig.c
examples/msg/tracing/simple.c
examples/msg/tracing/user_variables.c
include/msg/datatypes.h
include/msg/msg.h
src/bindings/lua/lua_comm.c
src/bindings/lua/lua_private.h
src/bindings/lua/lua_task.c
src/instr/instr_msg_task.c
src/instr/instr_private.h
src/msg/msg_gos.c
src/msg/msg_mailbox.c
src/msg/msg_mailbox.h
src/msg/msg_private.h
src/msg/msg_process.c
src/msg/msg_task.c
teshsuite/msg/get_sender.c
teshsuite/msg/trace/test_trace_integration.c

index 4454147..a0592ec 100644 (file)
@@ -54,7 +54,7 @@ typedef struct  {
   xbt_dynar_t isends; /* of msg_comm_t */
   /* Used to implement irecv+wait */
   xbt_dynar_t irecvs; /* of msg_comm_t */
   xbt_dynar_t isends; /* of msg_comm_t */
   /* Used to implement irecv+wait */
   xbt_dynar_t irecvs; /* of msg_comm_t */
-  xbt_dynar_t tasks; /* of m_task_t */
+  xbt_dynar_t tasks; /* of msg_task_t */
 } s_process_globals_t, *process_globals_t;
 
 /* Helper function */
 } s_process_globals_t, *process_globals_t;
 
 /* Helper function */
@@ -149,7 +149,7 @@ static void action_recv(const char *const *action)
 {
   char *name = NULL;
   char mailbox_name[250];
 {
   char *name = NULL;
   char mailbox_name[250];
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   double clock = MSG_get_clock();
 
   sprintf(mailbox_name, "%s_%s", action[2],
   double clock = MSG_get_clock();
 
   sprintf(mailbox_name, "%s_%s", action[2],
@@ -200,7 +200,7 @@ static void action_Irecv(const char *const *action)
 
   sprintf(mailbox, "%s_%s", action[2],
           MSG_process_get_name(MSG_process_self()));
 
   sprintf(mailbox, "%s_%s", action[2],
           MSG_process_get_name(MSG_process_self()));
-  m_task_t t=NULL;
+  msg_task_t t=NULL;
   xbt_dynar_push(globals->tasks,&t);
   msg_comm_t c =
       MSG_task_irecv(
   xbt_dynar_push(globals->tasks,&t);
   msg_comm_t c =
       MSG_task_irecv(
@@ -221,7 +221,7 @@ static void action_Irecv(const char *const *action)
 static void action_wait(const char *const *action)
 {
   char *name = NULL;
 static void action_wait(const char *const *action)
 {
   char *name = NULL;
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   msg_comm_t comm;
   double clock = MSG_get_clock();
   process_globals_t globals = (process_globals_t) MSG_process_get_data(MSG_process_self());
   msg_comm_t comm;
   double clock = MSG_get_clock();
   process_globals_t globals = (process_globals_t) MSG_process_get_data(MSG_process_self());
@@ -241,7 +241,7 @@ static void action_wait(const char *const *action)
   XBT_DEBUG("Entering %s", name);
   comm = xbt_dynar_pop_as(globals->irecvs,msg_comm_t);
   MSG_comm_wait(comm,-1);
   XBT_DEBUG("Entering %s", name);
   comm = xbt_dynar_pop_as(globals->irecvs,msg_comm_t);
   MSG_comm_wait(comm,-1);
-  task = xbt_dynar_pop_as(globals->tasks,m_task_t);
+  task = xbt_dynar_pop_as(globals->tasks,msg_task_t);
   MSG_comm_destroy(comm);
   MSG_task_destroy(task);
 
   MSG_comm_destroy(comm);
   MSG_task_destroy(task);
 
@@ -301,7 +301,7 @@ static void action_reduce(const char *const *action)
   char mailbox[80];
   double comm_size = parse_double(action[2]);
   double comp_size = parse_double(action[3]);
   char mailbox[80];
   double comm_size = parse_double(action[2]);
   double comp_size = parse_double(action[3]);
-  m_task_t comp_task = NULL;
+  msg_task_t comp_task = NULL;
   const char *process_name;
   double clock = MSG_get_clock();
 
   const char *process_name;
   double clock = MSG_get_clock();
 
@@ -318,7 +318,7 @@ static void action_reduce(const char *const *action)
     XBT_DEBUG("%s: %s is the Root", reduce_identifier, process_name);
 
     msg_comm_t *comms = xbt_new0(msg_comm_t,communicator_size-1);
     XBT_DEBUG("%s: %s is the Root", reduce_identifier, process_name);
 
     msg_comm_t *comms = xbt_new0(msg_comm_t,communicator_size-1);
-      m_task_t *tasks = xbt_new0(m_task_t,communicator_size-1);
+      msg_task_t *tasks = xbt_new0(msg_task_t,communicator_size-1);
       for (i = 1; i < communicator_size; i++) {
         sprintf(mailbox, "%s_p%d_p0", reduce_identifier, i);
         comms[i-1] = MSG_task_irecv(&(tasks[i-1]),mailbox);
       for (i = 1; i < communicator_size; i++) {
         sprintf(mailbox, "%s_p%d_p0", reduce_identifier, i);
         comms[i-1] = MSG_task_irecv(&(tasks[i-1]),mailbox);
@@ -354,7 +354,7 @@ static void action_bcast(const char *const *action)
   char *bcast_identifier;
   char mailbox[80];
   double comm_size = parse_double(action[2]);
   char *bcast_identifier;
   char mailbox[80];
   double comm_size = parse_double(action[2]);
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   const char *process_name;
   double clock = MSG_get_clock();
 
   const char *process_name;
   double clock = MSG_get_clock();
 
@@ -420,7 +420,7 @@ static void action_allReduce(const char *const *action) {
   char mailbox[80];
   double comm_size = parse_double(action[2]);
   double comp_size = parse_double(action[3]);
   char mailbox[80];
   double comm_size = parse_double(action[2]);
   double comp_size = parse_double(action[3]);
-  m_task_t task = NULL, comp_task = NULL;
+  msg_task_t task = NULL, comp_task = NULL;
   const char *process_name;
   double clock = MSG_get_clock();
 
   const char *process_name;
   double clock = MSG_get_clock();
 
@@ -437,7 +437,7 @@ static void action_allReduce(const char *const *action) {
     XBT_DEBUG("%s: %s is the Root", allreduce_identifier, process_name);
 
     msg_comm_t *comms = xbt_new0(msg_comm_t,communicator_size-1);
     XBT_DEBUG("%s: %s is the Root", allreduce_identifier, process_name);
 
     msg_comm_t *comms = xbt_new0(msg_comm_t,communicator_size-1);
-    m_task_t *tasks = xbt_new0(m_task_t,communicator_size-1);
+    msg_task_t *tasks = xbt_new0(msg_task_t,communicator_size-1);
     for (i = 1; i < communicator_size; i++) {
       sprintf(mailbox, "%s_p%d_p0", allreduce_identifier, i);
       comms[i-1] = MSG_task_irecv(&(tasks[i-1]),mailbox);
     for (i = 1; i < communicator_size; i++) {
       sprintf(mailbox, "%s_p%d_p0", allreduce_identifier, i);
       comms[i-1] = MSG_task_irecv(&(tasks[i-1]),mailbox);
@@ -503,7 +503,7 @@ static void action_compute(const char *const *action)
 {
   char *name = NULL;
   const char *amout = action[2];
 {
   char *name = NULL;
   const char *amout = action[2];
-  m_task_t task = MSG_task_create(name, parse_double(amout), 0, NULL);
+  msg_task_t task = MSG_task_create(name, parse_double(amout), 0, NULL);
   double clock = MSG_get_clock();
 
   if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
   double clock = MSG_get_clock();
 
   if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose))
@@ -524,7 +524,7 @@ static void action_init(const char *const *action)
   process_globals_t globals = (process_globals_t) calloc(1, sizeof(s_process_globals_t));
   globals->isends = xbt_dynar_new(sizeof(msg_comm_t),NULL);
   globals->irecvs = xbt_dynar_new(sizeof(msg_comm_t),NULL);
   process_globals_t globals = (process_globals_t) calloc(1, sizeof(s_process_globals_t));
   globals->isends = xbt_dynar_new(sizeof(msg_comm_t),NULL);
   globals->irecvs = xbt_dynar_new(sizeof(msg_comm_t),NULL);
-  globals->tasks  = xbt_dynar_new(sizeof(m_task_t),NULL);
+  globals->tasks  = xbt_dynar_new(sizeof(msg_task_t),NULL);
   MSG_process_set_data(MSG_process_self(),globals);
 
 }
   MSG_process_set_data(MSG_process_self(),globals);
 
 }
index 40e941f..34488fe 100644 (file)
@@ -101,7 +101,7 @@ static void set_predecessor(node_t node, int predecessor_id);
 
 // process functions
 static int node(int argc, char *argv[]);
 
 // process functions
 static int node(int argc, char *argv[]);
-static void handle_task(node_t node, m_task_t task);
+static void handle_task(node_t node, msg_task_t task);
 
 // Chord core
 static void create(node_t node);
 
 // Chord core
 static void create(node_t node);
@@ -277,7 +277,7 @@ int node(int argc, char *argv[])
   }
 
   double init_time = MSG_get_clock();
   }
 
   double init_time = MSG_get_clock();
-  m_task_t task_received = NULL;
+  msg_task_t task_received = NULL;
   int i;
   int join_success = 0;
   double deadline;
   int i;
   int join_success = 0;
   double deadline;
@@ -397,7 +397,7 @@ int node(int argc, char *argv[])
  * \param task the task to handle (don't touch it then:
  * it will be destroyed, reused or forwarded)
  */
  * \param task the task to handle (don't touch it then:
  * it will be destroyed, reused or forwarded)
  */
-static void handle_task(node_t node, m_task_t task) {
+static void handle_task(node_t node, msg_task_t task) {
 
   XBT_DEBUG("Handling task %p", task);
   char mailbox[MAILBOX_NAME_SIZE];
 
   XBT_DEBUG("Handling task %p", task);
   char mailbox[MAILBOX_NAME_SIZE];
@@ -566,7 +566,7 @@ static void quit_notify(node_t node, int to)
           node->pred_id, to_mailbox);
     req_data->type = TASK_SUCCESSOR_LEAVING;
   }
           node->pred_id, to_mailbox);
     req_data->type = TASK_SUCCESSOR_LEAVING;
   }
-  m_task_t task = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data);
+  msg_task_t task = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data);
   //char* mailbox = get_mailbox(to_mailbox);
   msg_comm_t comm = MSG_task_isend(task, to_mailbox);
   xbt_dynar_push(node->comms, &comm);
   //char* mailbox = get_mailbox(to_mailbox);
   msg_comm_t comm = MSG_task_isend(task, to_mailbox);
   xbt_dynar_push(node->comms, &comm);
@@ -611,7 +611,7 @@ static int remote_find_successor(node_t node, int ask_to, int id)
   req_data->issuer_host_name = MSG_host_get_name(MSG_host_self());
 
   // send a "Find Successor" request to ask_to_id
   req_data->issuer_host_name = MSG_host_get_name(MSG_host_self());
 
   // send a "Find Successor" request to ask_to_id
-  m_task_t task_sent = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data);
+  msg_task_t task_sent = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data);
   XBT_DEBUG("Sending a 'Find Successor' request (task %p) to %d for id %d", task_sent, ask_to, id);
   MSG_error_t res = MSG_task_send_with_timeout(task_sent, mailbox, timeout);
 
   XBT_DEBUG("Sending a 'Find Successor' request (task %p) to %d for id %d", task_sent, ask_to, id);
   MSG_error_t res = MSG_task_send_with_timeout(task_sent, mailbox, timeout);
 
@@ -628,7 +628,7 @@ static int remote_find_successor(node_t node, int ask_to, int id)
 
     do {
       if (node->comm_receive == NULL) {
 
     do {
       if (node->comm_receive == NULL) {
-        m_task_t task_received = NULL;
+        msg_task_t task_received = NULL;
         node->comm_receive = MSG_task_irecv(&task_received, node->mailbox);
       }
 
         node->comm_receive = MSG_task_irecv(&task_received, node->mailbox);
       }
 
@@ -642,7 +642,7 @@ static int remote_find_successor(node_t node, int ask_to, int id)
         node->comm_receive = NULL;
       }
       else {
         node->comm_receive = NULL;
       }
       else {
-        m_task_t task_received = MSG_comm_get_task(node->comm_receive);
+        msg_task_t task_received = MSG_comm_get_task(node->comm_receive);
         XBT_DEBUG("Received a task (%p)", task_received);
         task_data_t ans_data = MSG_task_get_data(task_received);
 
         XBT_DEBUG("Received a task (%p)", task_received);
         task_data_t ans_data = MSG_task_get_data(task_received);
 
@@ -693,7 +693,7 @@ static int remote_get_predecessor(node_t node, int ask_to)
 
   // send a "Get Predecessor" request to ask_to_id
   XBT_DEBUG("Sending a 'Get Predecessor' request to %d", ask_to);
 
   // send a "Get Predecessor" request to ask_to_id
   XBT_DEBUG("Sending a 'Get Predecessor' request to %d", ask_to);
-  m_task_t task_sent = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data);
+  msg_task_t task_sent = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data);
   MSG_error_t res = MSG_task_send_with_timeout(task_sent, mailbox, timeout);
 
   if (res != MSG_OK) {
   MSG_error_t res = MSG_task_send_with_timeout(task_sent, mailbox, timeout);
 
   if (res != MSG_OK) {
@@ -709,7 +709,7 @@ static int remote_get_predecessor(node_t node, int ask_to)
 
     do {
       if (node->comm_receive == NULL) { // FIXME simplify this
 
     do {
       if (node->comm_receive == NULL) { // FIXME simplify this
-        m_task_t task_received = NULL;
+        msg_task_t task_received = NULL;
         node->comm_receive = MSG_task_irecv(&task_received, node->mailbox);
       }
 
         node->comm_receive = MSG_task_irecv(&task_received, node->mailbox);
       }
 
@@ -723,7 +723,7 @@ static int remote_get_predecessor(node_t node, int ask_to)
         node->comm_receive = NULL;
       }
       else {
         node->comm_receive = NULL;
       }
       else {
-        m_task_t task_received = MSG_comm_get_task(node->comm_receive);
+        msg_task_t task_received = MSG_comm_get_task(node->comm_receive);
         task_data_t ans_data = MSG_task_get_data(task_received);
 
         if (MC_IS_ENABLED) {
         task_data_t ans_data = MSG_task_get_data(task_received);
 
         if (MC_IS_ENABLED) {
@@ -830,7 +830,7 @@ static void remote_notify(node_t node, int notify_id, int predecessor_candidate_
   req_data->issuer_host_name = MSG_host_get_name(MSG_host_self());
 
   // send a "Notify" request to notify_id
   req_data->issuer_host_name = MSG_host_get_name(MSG_host_self());
 
   // send a "Notify" request to notify_id
-  m_task_t task = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data);
+  msg_task_t task = MSG_task_create(NULL, COMP_SIZE, COMM_SIZE, req_data);
   XBT_DEBUG("Sending a 'Notify' request (task %p) to %d", task, notify_id);
   char mailbox[MAILBOX_NAME_SIZE];
   get_mailbox(notify_id, mailbox);
   XBT_DEBUG("Sending a 'Notify' request (task %p) to %d", task, notify_id);
   char mailbox[MAILBOX_NAME_SIZE];
   get_mailbox(notify_id, mailbox);
index 48a81d7..428d40c 100644 (file)
@@ -118,7 +118,7 @@ int master(int argc, char *argv[]) {
   for (i = 0; i < slaves_count; i++) {
     char mailbox_buffer[64];
     sprintf(mailbox_buffer,"Slave_%d",i);
   for (i = 0; i < slaves_count; i++) {
     char mailbox_buffer[64];
     sprintf(mailbox_buffer,"Slave_%d",i);
-    m_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
+    msg_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
     MSG_task_send(finalize, mailbox_buffer);
   }
 
     MSG_task_send(finalize, mailbox_buffer);
   }
 
@@ -138,7 +138,7 @@ int master(int argc, char *argv[]) {
 int slave_fun(int argc, char *argv[])
 {
   char *mailbox_name;
 int slave_fun(int argc, char *argv[])
 {
   char *mailbox_name;
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   _XBT_GNUC_UNUSED int res;
 
   /* since the slaves will move around, use slave_%d as mailbox names instead of hostnames */
   _XBT_GNUC_UNUSED int res;
 
   /* since the slaves will move around, use slave_%d as mailbox names instead of hostnames */
index 8d889c6..b80ee63 100644 (file)
@@ -31,7 +31,7 @@ int timer_start = 1;
 int bool_printed = 0;
 double start_time, end_time, elapsed_time;
 double gl_data_size[NTASKS];
 int bool_printed = 0;
 double start_time, end_time, elapsed_time;
 double gl_data_size[NTASKS];
-m_task_t gl_task_array[NTASKS];
+msg_task_t gl_task_array[NTASKS];
 const char *slavenames[NTASKS];
 const char *masternames[NTASKS];
 int gl_task_array_id = 0;
 const char *slavenames[NTASKS];
 const char *masternames[NTASKS];
 int gl_task_array_id = 0;
@@ -44,7 +44,7 @@ int master(int argc, char *argv[])
 {
   char *slavename = NULL;
   double task_comm_size = 0;
 {
   char *slavename = NULL;
   double task_comm_size = 0;
-  m_task_t todo;
+  msg_task_t todo;
   char id_alias[10];
   //unique id to control statistics
   int id = -1;
   char id_alias[10];
   //unique id to control statistics
   int id = -1;
@@ -117,7 +117,7 @@ int timer(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
 
 int slave(int argc, char *argv[])
 {
 
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   int a;
   int id = 0;
 #ifdef HAVE_LATENCY_BOUND_TRACKING
   int a;
   int id = 0;
 #ifdef HAVE_LATENCY_BOUND_TRACKING
index 445a700..2e5d8ed 100644 (file)
@@ -46,7 +46,7 @@ int sender(int argc, char *argv[])
 
   msg_comm_t comm = NULL;
   int i;
 
   msg_comm_t comm = NULL;
   int i;
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   MSG_process_sleep(sleep_start_time);
   for (i = 0; i < number_of_tasks; i++) {
     char mailbox[256];
   MSG_process_sleep(sleep_start_time);
   for (i = 0; i < number_of_tasks; i++) {
     char mailbox[256];
@@ -96,7 +96,7 @@ int sender(int argc, char *argv[])
 /** Receiver function  */
 int receiver(int argc, char *argv[])
 {
 /** Receiver function  */
 int receiver(int argc, char *argv[])
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   _XBT_GNUC_UNUSED MSG_error_t res;
   int id = -1;
   char mailbox[80];
   _XBT_GNUC_UNUSED MSG_error_t res;
   int id = -1;
   char mailbox[80];
index 8d59024..caff585 100644 (file)
@@ -35,7 +35,7 @@ int sender(int argc, char *argv[])
 
   msg_comm_t *comm = xbt_new(msg_comm_t, number_of_tasks + receivers_count);
   int i;
 
   msg_comm_t *comm = xbt_new(msg_comm_t, number_of_tasks + receivers_count);
   int i;
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   for (i = 0; i < number_of_tasks; i++) {
     char mailbox[256];
     char sprintf_buffer[256];
   for (i = 0; i < number_of_tasks; i++) {
     char mailbox[256];
     char sprintf_buffer[256];
@@ -66,7 +66,7 @@ int sender(int argc, char *argv[])
 /** Receiver function  */
 int receiver(int argc, char *argv[])
 {
 /** Receiver function  */
 int receiver(int argc, char *argv[])
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   _XBT_GNUC_UNUSED MSG_error_t res;
   int id = -1;
   char mailbox[80];
   _XBT_GNUC_UNUSED MSG_error_t res;
   int id = -1;
   char mailbox[80];
index 17ba947..21a093f 100644 (file)
@@ -36,7 +36,7 @@ int sender(int argc, char *argv[])
   double coef = 0;
   xbt_dynar_t d = xbt_dynar_new(sizeof(msg_comm_t), NULL);
   int i;
   double coef = 0;
   xbt_dynar_t d = xbt_dynar_new(sizeof(msg_comm_t), NULL);
   int i;
-  m_task_t task;
+  msg_task_t task;
   char mailbox[256];
   char sprintf_buffer[256];
   msg_comm_t comm;
   char mailbox[256];
   char sprintf_buffer[256];
   msg_comm_t comm;
@@ -91,7 +91,7 @@ int receiver(int argc, char *argv[])
   char mailbox[80];
   xbt_dynar_t comms = xbt_dynar_new(sizeof(msg_comm_t), NULL);
   int tasks = atof(argv[2]);
   char mailbox[80];
   xbt_dynar_t comms = xbt_dynar_new(sizeof(msg_comm_t), NULL);
   int tasks = atof(argv[2]);
-  m_task_t *task = xbt_new(m_task_t, tasks);
+  msg_task_t *task = xbt_new(msg_task_t, tasks);
 
   _XBT_GNUC_UNUSED int read;
   read = sscanf(argv[1], "%d", &id);
 
   _XBT_GNUC_UNUSED int read;
   read = sscanf(argv[1], "%d", &id);
@@ -107,7 +107,7 @@ int receiver(int argc, char *argv[])
   }
 
   /* Here we are waiting for the receiving of all communications */
   }
 
   /* Here we are waiting for the receiving of all communications */
-  m_task_t task_com;
+  msg_task_t task_com;
   while (!xbt_dynar_is_empty(comms)) {
     _XBT_GNUC_UNUSED MSG_error_t err;
     xbt_dynar_remove_at(comms, MSG_comm_waitany(comms), &res_irecv);
   while (!xbt_dynar_is_empty(comms)) {
     _XBT_GNUC_UNUSED MSG_error_t err;
     xbt_dynar_remove_at(comms, MSG_comm_waitany(comms), &res_irecv);
index 2e8166a..002eccc 100644 (file)
@@ -36,7 +36,7 @@ int master(int argc, char *argv[])
   for (i = 1; i <= number_of_jobs; i++) {
     char mailbox[256];
     char sprintf_buffer[256];
   for (i = 1; i <= number_of_jobs; i++) {
     char mailbox[256];
     char sprintf_buffer[256];
-    m_task_t task = NULL;
+    msg_task_t task = NULL;
 
     sprintf(mailbox, "slave-%ld", i % number_of_slaves);
     sprintf(sprintf_buffer, "Task_%d", i);
 
     sprintf(mailbox, "slave-%ld", i % number_of_slaves);
     sprintf(sprintf_buffer, "Task_%d", i);
@@ -55,7 +55,7 @@ int master(int argc, char *argv[])
     char mailbox[80];
 
     sprintf(mailbox, "slave-%ld", i % number_of_slaves);
     char mailbox[80];
 
     sprintf(mailbox, "slave-%ld", i % number_of_slaves);
-    m_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
+    msg_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
     MSG_task_send(finalize, mailbox);
   }
 
     MSG_task_send(finalize, mailbox);
   }
 
@@ -66,7 +66,7 @@ int master(int argc, char *argv[])
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   _XBT_GNUC_UNUSED int res;
 
   XBT_DEBUG("mailbox: %s",MSG_process_get_name(MSG_process_self()));
   _XBT_GNUC_UNUSED int res;
 
   XBT_DEBUG("mailbox: %s",MSG_process_get_name(MSG_process_self()));
index 37d39bf..6da3692 100644 (file)
@@ -157,7 +157,7 @@ int master(int argc, char *argv[])
 {
   int slaves_count = 0;
   msg_host_t *slaves = NULL;
 {
   int slaves_count = 0;
   msg_host_t *slaves = NULL;
-  m_task_t *todo = NULL;
+  msg_task_t *todo = NULL;
   int number_of_tasks = 0;
   double task_comp_size = 0;
   double task_comm_size = 0;
   int number_of_tasks = 0;
   double task_comp_size = 0;
   double task_comm_size = 0;
@@ -174,7 +174,7 @@ int master(int argc, char *argv[])
   {                             /*  Task creation */
     char sprintf_buffer[64];
 
   {                             /*  Task creation */
     char sprintf_buffer[64];
 
-    todo = xbt_new0(m_task_t, number_of_tasks);
+    todo = xbt_new0(msg_task_t, number_of_tasks);
 
     for (i = 0; i < number_of_tasks; i++) {
       sprintf(sprintf_buffer, "Task_%d", i);
 
     for (i = 0; i < number_of_tasks; i++) {
       sprintf(sprintf_buffer, "Task_%d", i);
@@ -233,7 +233,7 @@ int slave(int argc, char *argv[])
 {
   XBT_INFO("I'm a slave");
   while (1) {
 {
   XBT_INFO("I'm a slave");
   while (1) {
-    m_task_t task = NULL;
+    msg_task_t task = NULL;
     int a;
     a = MSG_task_receive(&task, MSG_host_get_name(MSG_host_self()));
     if (a == MSG_OK) {
     int a;
     a = MSG_task_receive(&task, MSG_host_get_name(MSG_host_self()));
     if (a == MSG_OK) {
index 83d2cb8..91579be 100644 (file)
@@ -27,7 +27,7 @@ int master(int argc, char *argv[])
 {
   int slaves_count = 0;
   msg_host_t *slaves = NULL;
 {
   int slaves_count = 0;
   msg_host_t *slaves = NULL;
-  m_task_t *todo = NULL;
+  msg_task_t *todo = NULL;
   int number_of_tasks = 0;
   double task_comp_size = 0;
   double task_comm_size = 0;
   int number_of_tasks = 0;
   double task_comp_size = 0;
   double task_comm_size = 0;
@@ -44,7 +44,7 @@ int master(int argc, char *argv[])
   {                             /*  Task creation */
     char sprintf_buffer[64];
 
   {                             /*  Task creation */
     char sprintf_buffer[64];
 
-    todo = xbt_new0(m_task_t, number_of_tasks);
+    todo = xbt_new0(msg_task_t, number_of_tasks);
 
     for (i = 0; i < number_of_tasks; i++) {
       sprintf(sprintf_buffer, "Task_%d", i);
 
     for (i = 0; i < number_of_tasks; i++) {
       sprintf(sprintf_buffer, "Task_%d", i);
@@ -103,7 +103,7 @@ int slave(int argc, char *argv[])
 {
   XBT_INFO("I'm a slave");
   while (1) {
 {
   XBT_INFO("I'm a slave");
   while (1) {
-    m_task_t task = NULL;
+    msg_task_t task = NULL;
     int a;
     a = MSG_task_receive(&(task), MSG_host_get_name(MSG_host_self()));
     if (a == MSG_OK) {
     int a;
     a = MSG_task_receive(&(task), MSG_host_get_name(MSG_host_self()));
     if (a == MSG_OK) {
index 6a1aec9..963a49e 100644 (file)
@@ -42,7 +42,7 @@ int master(int argc, char *argv[])
   for (i = 0; i < number_of_tasks; i++) {
     char mailbox[256];
     char sprintf_buffer[256];
   for (i = 0; i < number_of_tasks; i++) {
     char mailbox[256];
     char sprintf_buffer[256];
-    m_task_t task = NULL;
+    msg_task_t task = NULL;
 
     sprintf(mailbox, "slave-%ld", i % slaves_count);
     sprintf(sprintf_buffer, "Task_%d", i);
 
     sprintf(mailbox, "slave-%ld", i % slaves_count);
     sprintf(sprintf_buffer, "Task_%d", i);
@@ -61,7 +61,7 @@ int master(int argc, char *argv[])
     char mailbox[80];
 
     sprintf(mailbox, "slave-%ld", i % slaves_count);
     char mailbox[80];
 
     sprintf(mailbox, "slave-%ld", i % slaves_count);
-    m_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
+    msg_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
     MSG_task_send(finalize, mailbox);
   }
 
     MSG_task_send(finalize, mailbox);
   }
 
@@ -72,7 +72,7 @@ int master(int argc, char *argv[])
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   _XBT_GNUC_UNUSED int res;
   int id = -1;
   char mailbox[80];
   _XBT_GNUC_UNUSED int res;
   int id = -1;
   char mailbox[80];
index 7d4b12a..a9b6bf8 100644 (file)
@@ -60,7 +60,7 @@ int master(int argc, char *argv[])
   XBT_INFO("Got %d task to process :", number_of_tasks);
 
   for (i = 0; i < number_of_tasks; i++) {
   XBT_INFO("Got %d task to process :", number_of_tasks);
 
   for (i = 0; i < number_of_tasks; i++) {
-    m_task_t task = MSG_task_create("Task", task_comp_size, task_comm_size,
+    msg_task_t task = MSG_task_create("Task", task_comp_size, task_comm_size,
                                     xbt_new0(double, 1));
     int a;
     *((double *) task->data) = MSG_get_clock();
                                     xbt_new0(double, 1));
     int a;
     *((double *) task->data) = MSG_get_clock();
@@ -97,7 +97,7 @@ int master(int argc, char *argv[])
   XBT_INFO
       ("All tasks have been dispatched. Let's tell everybody the computation is over.");
   for (i = 0; i < slaves_count; i++) {
   XBT_INFO
       ("All tasks have been dispatched. Let's tell everybody the computation is over.");
   for (i = 0; i < slaves_count; i++) {
-    m_task_t task = MSG_task_create("finalize", 0, 0, FINALIZE);
+    msg_task_t task = MSG_task_create("finalize", 0, 0, FINALIZE);
     int a = MSG_task_send_with_timeout(task,MSG_host_get_name(slaves[i]),1.0);
     if (a == MSG_OK)
       continue;
     int a = MSG_task_send_with_timeout(task,MSG_host_get_name(slaves[i]),1.0);
     if (a == MSG_OK)
       continue;
@@ -131,7 +131,7 @@ int master(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
   while (1) {
 int slave(int argc, char *argv[])
 {
   while (1) {
-    m_task_t task = NULL;
+    msg_task_t task = NULL;
     int a;
     double time1, time2;
 
     int a;
     double time1, time2;
 
index 48bd0ca..bcb1965 100644 (file)
@@ -36,7 +36,7 @@ int master(int argc, char *argv[])
 {
   int slaves_count = 0;
   msg_host_t *slaves = NULL;
 {
   int slaves_count = 0;
   msg_host_t *slaves = NULL;
-  m_task_t *todo = NULL;
+  msg_task_t *todo = NULL;
   int number_of_tasks = 0;
   double task_comp_size = 0;
   double task_comm_size = 0;
   int number_of_tasks = 0;
   double task_comp_size = 0;
   double task_comm_size = 0;
@@ -53,7 +53,7 @@ int master(int argc, char *argv[])
   {                             /*  Task creation */
     char sprintf_buffer[64];
 
   {                             /*  Task creation */
     char sprintf_buffer[64];
 
-    todo = xbt_new0(m_task_t, number_of_tasks);
+    todo = xbt_new0(msg_task_t, number_of_tasks);
 
     for (i = 0; i < number_of_tasks; i++) {
       sprintf(sprintf_buffer, "Task_%d", i);
 
     for (i = 0; i < number_of_tasks; i++) {
       sprintf(sprintf_buffer, "Task_%d", i);
@@ -93,7 +93,7 @@ int master(int argc, char *argv[])
   XBT_INFO
       ("All tasks have been dispatched. Let's tell everybody the computation is over.");
   for (i = 0; i < slaves_count; i++) {
   XBT_INFO
       ("All tasks have been dispatched. Let's tell everybody the computation is over.");
   for (i = 0; i < slaves_count; i++) {
-    m_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
+    msg_task_t finalize = MSG_task_create("finalize", 0, 0, FINALIZE);
     MSG_task_send(finalize, MSG_host_get_name(slaves[i]));
   }
 
     MSG_task_send(finalize, MSG_host_get_name(slaves[i]));
   }
 
@@ -106,7 +106,7 @@ int master(int argc, char *argv[])
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   _XBT_GNUC_UNUSED int res;
   while (1) {
     res = MSG_task_receive(&(task),MSG_host_get_name(MSG_host_self()));
   _XBT_GNUC_UNUSED int res;
   while (1) {
     res = MSG_task_receive(&(task),MSG_host_get_name(MSG_host_self()));
@@ -150,7 +150,7 @@ int forwarder(int argc, char *argv[])
 
   i = 0;
   while (1) {
 
   i = 0;
   while (1) {
-    m_task_t task = NULL;
+    msg_task_t task = NULL;
     int a;
     a = MSG_task_receive(&(task),MSG_host_get_name(MSG_host_self()));
     if (a == MSG_OK) {
     int a;
     a = MSG_task_receive(&(task),MSG_host_get_name(MSG_host_self()));
     if (a == MSG_OK) {
index 3543f23..1aabaa2 100644 (file)
@@ -36,7 +36,7 @@ int master(int argc, char *argv[])
   for (i = 0; i < number_of_tasks; i++) {
     char mailbox[256];
     char sprintf_buffer[256];
   for (i = 0; i < number_of_tasks; i++) {
     char mailbox[256];
     char sprintf_buffer[256];
-    m_task_t task = NULL;
+    msg_task_t task = NULL;
 
     sprintf(mailbox, "slave-%ld", i % slaves_count);
     sprintf(sprintf_buffer, "Task_%d", i);
 
     sprintf(mailbox, "slave-%ld", i % slaves_count);
     sprintf(sprintf_buffer, "Task_%d", i);
@@ -56,7 +56,7 @@ int master(int argc, char *argv[])
     char mailbox[80];
 
     sprintf(mailbox, "slave-%ld", i % slaves_count);
     char mailbox[80];
 
     sprintf(mailbox, "slave-%ld", i % slaves_count);
-    m_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
+    msg_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
     MSG_task_send(finalize, mailbox);
   }
 
     MSG_task_send(finalize, mailbox);
   }
 
@@ -67,7 +67,7 @@ int master(int argc, char *argv[])
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   _XBT_GNUC_UNUSED int res;
   int id = -1;
   char mailbox[80];
   _XBT_GNUC_UNUSED int res;
   int id = -1;
   char mailbox[80];
index fef2e70..7ce0967 100644 (file)
@@ -26,7 +26,7 @@ static msg_process_t process_to_migrate = NULL;
 /** The guy we will move from host to host. It move alone and then is moved by policeman back  */
 static int emigrant(int argc, char *argv[])
 {
 /** The guy we will move from host to host. It move alone and then is moved by policeman back  */
 static int emigrant(int argc, char *argv[])
 {
-  m_task_t task;
+  msg_task_t task;
   XBT_INFO
       ("I'll look for a new job on another machine where the grass is greener.");
   MSG_process_migrate(MSG_process_self(), MSG_get_host_by_name("Boivin"));
   XBT_INFO
       ("I'll look for a new job on another machine where the grass is greener.");
   MSG_process_migrate(MSG_process_self(), MSG_get_host_by_name("Boivin"));
index ed00976..d668579 100644 (file)
@@ -45,7 +45,7 @@ int timer_start; //set as 1 in the master process
 int bool_printed = 0;
 double start_time, end_time, elapsed_time;
 double gl_data_size[NTASKS];
 int bool_printed = 0;
 double start_time, end_time, elapsed_time;
 double gl_data_size[NTASKS];
-m_task_t gl_task_array[NTASKS];
+msg_task_t gl_task_array[NTASKS];
 const char *slavenames[NTASKS];
 const char *masternames[NTASKS];
 int gl_task_array_id = 0;
 const char *slavenames[NTASKS];
 const char *masternames[NTASKS];
 int gl_task_array_id = 0;
@@ -58,7 +58,7 @@ int master(int argc, char *argv[])
 {
   char *slavename = NULL;
   double task_comm_size = 0;
 {
   char *slavename = NULL;
   double task_comm_size = 0;
-  m_task_t todo;
+  msg_task_t todo;
   char id_alias[10];
   //unique id to control statistics
   int id = -1;
   char id_alias[10];
   //unique id to control statistics
   int id = -1;
@@ -139,7 +139,7 @@ int timer(int argc, char *argv[])
 int slave(int argc, char *argv[])
 {
 
 int slave(int argc, char *argv[])
 {
 
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   int a = MSG_OK;
   int id = 0;
   char id_alias[10];
   int a = MSG_OK;
   int id = 0;
   char id_alias[10];
index c775559..c76d604 100644 (file)
@@ -37,7 +37,7 @@ int test(int argc, char *argv[])
   double task_comm_size = 10000;
   double *computation_amount = NULL;
   double *communication_amount = NULL;
   double task_comm_size = 10000;
   double *computation_amount = NULL;
   double *communication_amount = NULL;
-  m_task_t ptask = NULL;
+  msg_task_t ptask = NULL;
   int i, j;
 
   slaves_dynar = MSG_hosts_as_dynar();
   int i, j;
 
   slaves_dynar = MSG_hosts_as_dynar();
index 05d6c5e..6d3d0e4 100644 (file)
@@ -26,7 +26,7 @@ int execute(int argc, char *argv[])
   char buffer[32];
   int i, j;
   msg_host_t *m_host_list = NULL;
   char buffer[32];
   int i, j;
   msg_host_t *m_host_list = NULL;
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   int host_list_size;
   double *computation_duration = NULL;
   double *communication_table = NULL;
   int host_list_size;
   double *computation_duration = NULL;
   double *communication_table = NULL;
@@ -83,7 +83,7 @@ int redistribute(int argc, char *argv[])
   char buffer[32];
   int i, j;
   msg_host_t *m_host_list = NULL;
   char buffer[32];
   int i, j;
   msg_host_t *m_host_list = NULL;
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   int host_list_size;
   double *computation_duration = NULL;
   double *communication_table = NULL;
   int host_list_size;
   double *computation_duration = NULL;
   double *communication_table = NULL;
index 6ff6d1a..7b95d9c 100644 (file)
@@ -160,7 +160,7 @@ int node(int argc, char **argv)
 
   /* The rest: return the result to node 0 */
   }else{
 
   /* The rest: return the result to node 0 */
   }else{
-    m_task_t task;
+    msg_task_t task;
 
     XBT_VERB("Multiplication done. Send the sub-result.");
 
 
     XBT_VERB("Multiplication done. Send the sub-result.");
 
@@ -187,7 +187,7 @@ static void broadcast_jobs(node_job_t *jobs)
 {
   int node;
   char node_mbox[MAILBOX_NAME_SIZE];
 {
   int node;
   char node_mbox[MAILBOX_NAME_SIZE];
-  m_task_t task;
+  msg_task_t task;
   msg_comm_t comms[GRID_NUM_NODES - 1] = {0};
 
   XBT_VERB("Broadcast Jobs");
   msg_comm_t comms[GRID_NUM_NODES - 1] = {0};
 
   XBT_VERB("Broadcast Jobs");
@@ -202,7 +202,7 @@ static void broadcast_jobs(node_job_t *jobs)
 
 static node_job_t wait_job(int selfid)
 {
 
 static node_job_t wait_job(int selfid)
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   char self_mbox[MAILBOX_NAME_SIZE];
   node_job_t job;
   snprintf(self_mbox, MAILBOX_NAME_SIZE - 1, "%d", selfid);
   char self_mbox[MAILBOX_NAME_SIZE];
   node_job_t job;
   snprintf(self_mbox, MAILBOX_NAME_SIZE - 1, "%d", selfid);
@@ -218,7 +218,7 @@ static void broadcast_matrix(xbt_matrix_t M, int num_nodes, int *nodes)
 {
   int node;
   char node_mbox[MAILBOX_NAME_SIZE];
 {
   int node;
   char node_mbox[MAILBOX_NAME_SIZE];
-  m_task_t task;
+  msg_task_t task;
   xbt_matrix_t sM;
 
   for(node=0; node < num_nodes; node++){
   xbt_matrix_t sM;
 
   for(node=0; node < num_nodes; node++){
@@ -233,7 +233,7 @@ static void broadcast_matrix(xbt_matrix_t M, int num_nodes, int *nodes)
 
 static void get_sub_matrix(xbt_matrix_t *sM, int selfid)
 {
 
 static void get_sub_matrix(xbt_matrix_t *sM, int selfid)
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   char node_mbox[MAILBOX_NAME_SIZE];
 
   XBT_VERB("Get sub-matrix");
   char node_mbox[MAILBOX_NAME_SIZE];
 
   XBT_VERB("Get sub-matrix");
@@ -245,7 +245,7 @@ static void get_sub_matrix(xbt_matrix_t *sM, int selfid)
 }
 
 static void task_cleanup(void *arg){
 }
 
 static void task_cleanup(void *arg){
-  m_task_t task = (m_task_t)arg;
+  msg_task_t task = (msg_task_t)arg;
   xbt_matrix_t m = (xbt_matrix_t)MSG_task_get_data(task);
   xbt_matrix_free(m);
   MSG_task_destroy(task);
   xbt_matrix_t m = (xbt_matrix_t)MSG_task_get_data(task);
   xbt_matrix_free(m);
   MSG_task_destroy(task);
@@ -334,7 +334,7 @@ static void create_jobs(xbt_matrix_t A, xbt_matrix_t B, node_job_t *jobs)
 static void receive_results(result_t *results){
   int node;
   msg_comm_t comms[GRID_NUM_NODES-1] = {0};
 static void receive_results(result_t *results){
   int node;
   msg_comm_t comms[GRID_NUM_NODES-1] = {0};
-  m_task_t tasks[GRID_NUM_NODES-1] = {0};
+  msg_task_t tasks[GRID_NUM_NODES-1] = {0};
 
   XBT_VERB("Receive Results.");
 
 
   XBT_VERB("Receive Results.");
 
index 8690ec5..df17a48 100644 (file)
@@ -26,7 +26,7 @@ static int test(int argc, char *argv[])
 {
   double computation_amount = 0.0;
   double priority = 1.0;
 {
   double computation_amount = 0.0;
   double priority = 1.0;
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
 
   _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%lg", &computation_amount);
   xbt_assert(res, "Invalid argument %s\n", argv[1]);
 
   _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%lg", &computation_amount);
   xbt_assert(res, "Invalid argument %s\n", argv[1]);
index 75b84bc..52e1862 100644 (file)
@@ -37,8 +37,8 @@ int sender(int argc, char *argv[])
 {
   msg_host_t host = NULL;
   double time;
 {
   msg_host_t host = NULL;
   double time;
-  m_task_t task_la = NULL;
-  m_task_t task_bw = NULL;
+  msg_task_t task_la = NULL;
+  msg_task_t task_bw = NULL;
   char sprintf_buffer_la[64];
   char sprintf_buffer_bw[64];
 
   char sprintf_buffer_la[64];
   char sprintf_buffer_bw[64];
 
@@ -82,8 +82,8 @@ int sender(int argc, char *argv[])
 int receiver(int argc, char *argv[])
 {
   double time, time1, sender_time;
 int receiver(int argc, char *argv[])
 {
   double time, time1, sender_time;
-  m_task_t task_la = NULL;
-  m_task_t task_bw = NULL;
+  msg_task_t task_la = NULL;
+  msg_task_t task_bw = NULL;
   int a;
   double communication_time = 0;
 
   int a;
   double communication_time = 0;
 
index 75be495..94bd2ca 100644 (file)
@@ -32,7 +32,7 @@ int host(int argc, char *argv[])
 {
   int host_number = atoi(MSG_process_get_name(MSG_process_self()));
   char mailbox[256];
 {
   int host_number = atoi(MSG_process_get_name(MSG_process_self()));
   char mailbox[256];
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   _XBT_GNUC_UNUSED int res;
   if (host_number == 0){ //master  send then receive
     sprintf(mailbox, "%d", host_number+1);
   _XBT_GNUC_UNUSED int res;
   if (host_number == 0){ //master  send then receive
     sprintf(mailbox, "%d", host_number+1);
index d85e651..fd5221e 100644 (file)
@@ -40,7 +40,7 @@ int master(int argc, char *argv[])
 
   int i;
   for (i = 0; i < number_of_tasks; i++) {
 
   int i;
   for (i = 0; i < number_of_tasks; i++) {
-    m_task_t task = NULL;
+    msg_task_t task = NULL;
 
     //creating task and setting its category
     if (i % 2) {
 
     //creating task and setting its category
     if (i % 2) {
@@ -57,7 +57,7 @@ int master(int argc, char *argv[])
   }
 
   for (i = 0; i < slaves_count; i++) {
   }
 
   for (i = 0; i < slaves_count; i++) {
-    m_task_t finalize = MSG_task_create("finalize", 0, 1000, 0);
+    msg_task_t finalize = MSG_task_create("finalize", 0, 1000, 0);
     MSG_task_set_category(finalize, "finalize");
     MSG_task_send(finalize, "master_mailbox");
   }
     MSG_task_set_category(finalize, "finalize");
     MSG_task_send(finalize, "master_mailbox");
   }
@@ -68,7 +68,7 @@ int master(int argc, char *argv[])
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
 
   while (1) {
     MSG_task_receive(&(task), "master_mailbox");
 
   while (1) {
     MSG_task_receive(&(task), "master_mailbox");
index 912697a..cf228cd 100644 (file)
@@ -26,7 +26,7 @@ int master(int argc, char *argv[]);
 //dump function to create and execute a task
 static void create_and_execute_task (void)
 {
 //dump function to create and execute a task
 static void create_and_execute_task (void)
 {
-  m_task_t task = MSG_task_create("task", 1000000, 0, NULL);
+  msg_task_t task = MSG_task_create("task", 1000000, 0, NULL);
   MSG_task_execute (task);
   MSG_task_destroy (task);
 }
   MSG_task_execute (task);
   MSG_task_destroy (task);
 }
index 5e255ea..15db60e 100644 (file)
@@ -23,7 +23,7 @@ int master(int argc, char *argv[]);
 //dump function to create and execute a task
 static void create_and_execute_task (void)
 {
 //dump function to create and execute a task
 static void create_and_execute_task (void)
 {
-  m_task_t task = MSG_task_create("task", 1000000, 0, NULL);
+  msg_task_t task = MSG_task_create("task", 1000000, 0, NULL);
   MSG_task_execute (task);
   MSG_task_destroy (task);
 }
   MSG_task_execute (task);
   MSG_task_destroy (task);
 }
index 6d82eb4..532d6f6 100644 (file)
@@ -46,7 +46,7 @@ int master(int argc, char *argv[])
   TRACE_mark("msmark", "start_send_tasks");
   int i;
   for (i = 0; i < number_of_tasks; i++) {
   TRACE_mark("msmark", "start_send_tasks");
   int i;
   for (i = 0; i < number_of_tasks; i++) {
-    m_task_t task = NULL;
+    msg_task_t task = NULL;
     task = MSG_task_create("task", task_comp_size, task_comm_size, NULL);
 
     //setting the variable "task_creation" to value i
     task = MSG_task_create("task", task_comp_size, task_comm_size, NULL);
 
     //setting the variable "task_creation" to value i
@@ -60,7 +60,7 @@ int master(int argc, char *argv[])
   TRACE_mark("msmark", "finish_send_tasks");
 
   for (i = 0; i < slaves_count; i++) {
   TRACE_mark("msmark", "finish_send_tasks");
 
   for (i = 0; i < slaves_count; i++) {
-    m_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
+    msg_task_t finalize = MSG_task_create("finalize", 0, 0, 0);
     MSG_task_set_category(finalize, "finalize");
     MSG_task_send(finalize, "master_mailbox");
   }
     MSG_task_set_category(finalize, "finalize");
     MSG_task_send(finalize, "master_mailbox");
   }
@@ -71,7 +71,7 @@ int master(int argc, char *argv[])
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
 /** Receiver function  */
 int slave(int argc, char *argv[])
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
 
   TRACE_host_variable_set(MSG_host_get_name(MSG_host_self()), "is_slave", 1);
   TRACE_host_variable_set(MSG_host_get_name(MSG_host_self()),
 
   TRACE_host_variable_set(MSG_host_get_name(MSG_host_self()), "is_slave", 1);
   TRACE_host_variable_set(MSG_host_get_name(MSG_host_self()),
index 2666d84..922495f 100644 (file)
@@ -26,7 +26,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
 /** The guy we will move from host to host. It move alone and then is moved by policeman back  */
 static int emigrant(int argc, char *argv[])
 {
 /** The guy we will move from host to host. It move alone and then is moved by policeman back  */
 static int emigrant(int argc, char *argv[])
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   char *destination = NULL;
 
   MSG_process_sleep(2);
   char *destination = NULL;
 
   MSG_process_sleep(2);
@@ -46,7 +46,7 @@ static int emigrant(int argc, char *argv[])
 
 static int master(int argc, char *argv[])
 {
 
 static int master(int argc, char *argv[])
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
 
   // I am the master of emigrant process,
   // I tell it where it must emigrate to.
 
   // I am the master of emigrant process,
   // I tell it where it must emigrate to.
index 5842689..f6c852f 100644 (file)
@@ -29,7 +29,7 @@ int simple_func(int argc, char *argv[]);
 /** Emitter function  */
 int simple_func(int argc, char *argv[])
 {
 /** Emitter function  */
 int simple_func(int argc, char *argv[])
 {
-  m_task_t task = MSG_task_create("task", 100, 0, NULL);
+  msg_task_t task = MSG_task_create("task", 100, 0, NULL);
   MSG_task_execute (task);
   MSG_task_destroy (task);
   return 0;
   MSG_task_execute (task);
   MSG_task_destroy (task);
   return 0;
index c2d7573..1a4e607 100644 (file)
@@ -36,7 +36,7 @@ int master(int argc, char *argv[])
 
   for (i = 0; i < 10; i++) {
     //create and execute a task just to make the simulated time advance
 
   for (i = 0; i < 10; i++) {
     //create and execute a task just to make the simulated time advance
-    m_task_t task = MSG_task_create("task", 10000, 0, NULL);
+    msg_task_t task = MSG_task_create("task", 10000, 0, NULL);
     MSG_task_execute (task);
     MSG_task_destroy (task);
 
     MSG_task_execute (task);
     MSG_task_destroy (task);
 
@@ -46,7 +46,7 @@ int master(int argc, char *argv[])
 
   for (i = 0; i < 10; i++) {
     //create and execute a task just to make the simulated time advance
 
   for (i = 0; i < 10; i++) {
     //create and execute a task just to make the simulated time advance
-    m_task_t task = MSG_task_create("task", 10000, 0, NULL);
+    msg_task_t task = MSG_task_create("task", 10000, 0, NULL);
     MSG_task_execute (task);
     MSG_task_destroy (task);
 
     MSG_task_execute (task);
     MSG_task_destroy (task);
 
index f7a6c78..8ca00d6 100644 (file)
@@ -53,7 +53,7 @@ typedef struct msg_host *msg_host_t;
 
 typedef struct simdata_task *simdata_task_t;
 
 
 typedef struct simdata_task *simdata_task_t;
 
-typedef struct m_task {
+typedef struct msg_task {
   char *name;                   /**< @brief task name if any */
   simdata_task_t simdata;       /**< @brief simulator data */
   void *data;                   /**< @brief user data */
   char *name;                   /**< @brief task name if any */
   simdata_task_t simdata;       /**< @brief simulator data */
   void *data;                   /**< @brief user data */
@@ -61,7 +61,7 @@ typedef struct m_task {
   long long int counter;        /* task unique identifier for instrumentation */
   char *category;               /* task category for instrumentation */
 #endif
   long long int counter;        /* task unique identifier for instrumentation */
   char *category;               /* task category for instrumentation */
 #endif
-} s_m_task_t;
+} s_msg_task_t;
 
 /** @brief Task datatype.
     @ingroup m_task_management 
 
 /** @brief Task datatype.
     @ingroup m_task_management 
@@ -70,7 +70,7 @@ typedef struct m_task {
     amount</em>, a <em>message size</em> and some <em>private
     data</em>.
  */
     amount</em>, a <em>message size</em> and some <em>private
     data</em>.
  */
-typedef struct m_task *m_task_t;
+typedef struct msg_task *msg_task_t;
 
 
 /* ******************************** File ************************************ */
 
 
 /* ******************************** File ************************************ */
@@ -144,6 +144,7 @@ typedef struct s_smx_process *msg_process_t;
 /* Compatibility typedefs */
 typedef msg_process_t m_process_t;
 typedef msg_host_t m_host_t;
 /* Compatibility typedefs */
 typedef msg_process_t m_process_t;
 typedef msg_host_t m_host_t;
+typedef msg_task_t m_task_t;
 
 #ifdef MSG_USE_DEPRECATED
 typedef int m_channel_t;
 
 #ifdef MSG_USE_DEPRECATED
 typedef int m_channel_t;
index 3fb95ba..314269d 100644 (file)
@@ -159,68 +159,68 @@ XBT_PUBLIC(void) MSG_process_on_exit(int_f_pvoid_t fun, void *data);
 XBT_PUBLIC(void) MSG_process_auto_restart_set(msg_process_t process, int auto_restart);
 
 /************************** Task handling ************************************/
 XBT_PUBLIC(void) MSG_process_auto_restart_set(msg_process_t process, int auto_restart);
 
 /************************** Task handling ************************************/
-XBT_PUBLIC(m_task_t) MSG_task_create(const char *name,
+XBT_PUBLIC(msg_task_t) MSG_task_create(const char *name,
                                      double compute_duration,
                                      double message_size, void *data);
 XBT_PUBLIC(m_gpu_task_t) MSG_gpu_task_create(const char *name,
                                      double compute_duration,
                                      double dispatch_latency,
                                      double collect_latency);
                                      double compute_duration,
                                      double message_size, void *data);
 XBT_PUBLIC(m_gpu_task_t) MSG_gpu_task_create(const char *name,
                                      double compute_duration,
                                      double dispatch_latency,
                                      double collect_latency);
-XBT_PUBLIC(m_task_t) MSG_parallel_task_create(const char *name,
+XBT_PUBLIC(msg_task_t) MSG_parallel_task_create(const char *name,
                                               int host_nb,
                                               const msg_host_t * host_list,
                                               double *computation_amount,
                                               double *communication_amount,
                                               void *data);
                                               int host_nb,
                                               const msg_host_t * host_list,
                                               double *computation_amount,
                                               double *communication_amount,
                                               void *data);
-XBT_PUBLIC(void *) MSG_task_get_data(m_task_t task);
-XBT_PUBLIC(void) MSG_task_set_data(m_task_t task, void *data);
+XBT_PUBLIC(void *) MSG_task_get_data(msg_task_t task);
+XBT_PUBLIC(void) MSG_task_set_data(msg_task_t task, void *data);
 XBT_PUBLIC(void) MSG_task_set_copy_callback(void (*callback) (
 XBT_PUBLIC(void) MSG_task_set_copy_callback(void (*callback) (
-    m_task_t task, msg_process_t src, msg_process_t dst));
-XBT_PUBLIC(msg_process_t) MSG_task_get_sender(m_task_t task);
-XBT_PUBLIC(msg_host_t) MSG_task_get_source(m_task_t task);
-XBT_PUBLIC(const char *) MSG_task_get_name(m_task_t task);
-XBT_PUBLIC(void) MSG_task_set_name(m_task_t task, const char *name);
-XBT_PUBLIC(MSG_error_t) MSG_task_cancel(m_task_t task);
-XBT_PUBLIC(MSG_error_t) MSG_task_destroy(m_task_t task);
-
-XBT_PUBLIC(MSG_error_t) MSG_task_receive_from_host(m_task_t * task, const char *alias,
+    msg_task_t task, msg_process_t src, msg_process_t dst));
+XBT_PUBLIC(msg_process_t) MSG_task_get_sender(msg_task_t task);
+XBT_PUBLIC(msg_host_t) MSG_task_get_source(msg_task_t task);
+XBT_PUBLIC(const char *) MSG_task_get_name(msg_task_t task);
+XBT_PUBLIC(void) MSG_task_set_name(msg_task_t task, const char *name);
+XBT_PUBLIC(MSG_error_t) MSG_task_cancel(msg_task_t task);
+XBT_PUBLIC(MSG_error_t) MSG_task_destroy(msg_task_t task);
+
+XBT_PUBLIC(MSG_error_t) MSG_task_receive_from_host(msg_task_t * task, const char *alias,
                                        msg_host_t host);
 
                                        msg_host_t host);
 
-XBT_PUBLIC(MSG_error_t) MSG_task_execute(m_task_t task);
-XBT_PUBLIC(MSG_error_t) MSG_parallel_task_execute(m_task_t task);
-XBT_PUBLIC(void) MSG_task_set_priority(m_task_t task, double priority);
+XBT_PUBLIC(MSG_error_t) MSG_task_execute(msg_task_t task);
+XBT_PUBLIC(MSG_error_t) MSG_parallel_task_execute(msg_task_t task);
+XBT_PUBLIC(void) MSG_task_set_priority(msg_task_t task, double priority);
 
 XBT_PUBLIC(MSG_error_t) MSG_process_sleep(double nb_sec);
 
 
 XBT_PUBLIC(MSG_error_t) MSG_process_sleep(double nb_sec);
 
-XBT_PUBLIC(double) MSG_task_get_compute_duration(m_task_t task);
-XBT_PUBLIC(void) MSG_task_set_compute_duration(m_task_t task,
+XBT_PUBLIC(double) MSG_task_get_compute_duration(msg_task_t task);
+XBT_PUBLIC(void) MSG_task_set_compute_duration(msg_task_t task,
                                                double compute_duration);
                                                double compute_duration);
-XBT_PUBLIC(double) MSG_task_get_remaining_computation(m_task_t task);
-XBT_PUBLIC(double) MSG_task_get_remaining_communication(m_task_t task);
-XBT_PUBLIC(int) MSG_task_is_latency_bounded(m_task_t task);
-XBT_PUBLIC(double) MSG_task_get_data_size(m_task_t task);
+XBT_PUBLIC(double) MSG_task_get_remaining_computation(msg_task_t task);
+XBT_PUBLIC(double) MSG_task_get_remaining_communication(msg_task_t task);
+XBT_PUBLIC(int) MSG_task_is_latency_bounded(msg_task_t task);
+XBT_PUBLIC(double) MSG_task_get_data_size(msg_task_t task);
 
 
 XBT_PUBLIC(MSG_error_t)
 
 
 XBT_PUBLIC(MSG_error_t)
-    MSG_task_receive_ext(m_task_t * task, const char *alias, double timeout,
+    MSG_task_receive_ext(msg_task_t * task, const char *alias, double timeout,
                      msg_host_t host);
 
 XBT_PUBLIC(MSG_error_t)
                      msg_host_t host);
 
 XBT_PUBLIC(MSG_error_t)
-    MSG_task_receive_with_timeout(m_task_t * task, const char *alias,
+    MSG_task_receive_with_timeout(msg_task_t * task, const char *alias,
                               double timeout);
 
 XBT_PUBLIC(MSG_error_t)
                               double timeout);
 
 XBT_PUBLIC(MSG_error_t)
-    MSG_task_receive(m_task_t * task, const char *alias);
+    MSG_task_receive(msg_task_t * task, const char *alias);
 #define MSG_task_recv(t,a) MSG_task_receive(t,a)
 
 #define MSG_task_recv(t,a) MSG_task_receive(t,a)
 
-XBT_PUBLIC(msg_comm_t) MSG_task_isend(m_task_t task, const char *alias);
-XBT_PUBLIC(msg_comm_t) MSG_task_isend_with_matching(m_task_t task,
+XBT_PUBLIC(msg_comm_t) MSG_task_isend(msg_task_t task, const char *alias);
+XBT_PUBLIC(msg_comm_t) MSG_task_isend_with_matching(msg_task_t task,
                                                     const char *alias,
                                                     int (*match_fun)(void*,void*, smx_action_t),
                                                     void *match_data);
 
                                                     const char *alias,
                                                     int (*match_fun)(void*,void*, smx_action_t),
                                                     void *match_data);
 
-XBT_PUBLIC(void) MSG_task_dsend(m_task_t task, const char *alias, void_f_pvoid_t cleanup);
-XBT_PUBLIC(msg_comm_t) MSG_task_irecv(m_task_t * task, const char *alias);
+XBT_PUBLIC(void) MSG_task_dsend(msg_task_t task, const char *alias, void_f_pvoid_t cleanup);
+XBT_PUBLIC(msg_comm_t) MSG_task_irecv(msg_task_t * task, const char *alias);
 XBT_PUBLIC(int) MSG_comm_test(msg_comm_t comm);
 XBT_PUBLIC(int) MSG_comm_testany(xbt_dynar_t comms);
 XBT_PUBLIC(void) MSG_comm_destroy(msg_comm_t comm);
 XBT_PUBLIC(int) MSG_comm_test(msg_comm_t comm);
 XBT_PUBLIC(int) MSG_comm_testany(xbt_dynar_t comms);
 XBT_PUBLIC(void) MSG_comm_destroy(msg_comm_t comm);
@@ -228,7 +228,7 @@ XBT_PUBLIC(MSG_error_t) MSG_comm_wait(msg_comm_t comm, double timeout);
 XBT_PUBLIC(void) MSG_comm_waitall(msg_comm_t * comm, int nb_elem,
                                   double timeout);
 XBT_PUBLIC(int) MSG_comm_waitany(xbt_dynar_t comms);
 XBT_PUBLIC(void) MSG_comm_waitall(msg_comm_t * comm, int nb_elem,
                                   double timeout);
 XBT_PUBLIC(int) MSG_comm_waitany(xbt_dynar_t comms);
-XBT_PUBLIC(m_task_t) MSG_comm_get_task(msg_comm_t comm);
+XBT_PUBLIC(msg_task_t) MSG_comm_get_task(msg_comm_t comm);
 XBT_PUBLIC(MSG_error_t) MSG_comm_get_status(msg_comm_t comm);
 
 XBT_PUBLIC(int) MSG_task_listen(const char *alias);
 XBT_PUBLIC(MSG_error_t) MSG_comm_get_status(msg_comm_t comm);
 
 XBT_PUBLIC(int) MSG_task_listen(const char *alias);
@@ -237,27 +237,27 @@ XBT_PUBLIC(int) MSG_task_listen_from_host(const char *alias,
                                           msg_host_t host);
 
 XBT_PUBLIC(MSG_error_t)
                                           msg_host_t host);
 
 XBT_PUBLIC(MSG_error_t)
-    MSG_task_send_with_timeout(m_task_t task, const char *alias,
+    MSG_task_send_with_timeout(msg_task_t task, const char *alias,
                            double timeout);
 
 XBT_PUBLIC(MSG_error_t)
                            double timeout);
 
 XBT_PUBLIC(MSG_error_t)
-    MSG_task_send(m_task_t task, const char *alias);
+    MSG_task_send(msg_task_t task, const char *alias);
 
 XBT_PUBLIC(MSG_error_t)
 
 XBT_PUBLIC(MSG_error_t)
-    MSG_task_send_bounded(m_task_t task, const char *alias, double rate);
+    MSG_task_send_bounded(msg_task_t task, const char *alias, double rate);
 
 XBT_PUBLIC(int) MSG_task_listen_from(const char *alias);
 
 
 XBT_PUBLIC(int) MSG_task_listen_from(const char *alias);
 
-XBT_PUBLIC(void) MSG_task_set_category (m_task_t task, const char *category);
-XBT_PUBLIC(const char *) MSG_task_get_category (m_task_t task);
+XBT_PUBLIC(void) MSG_task_set_category (msg_task_t task, const char *category);
+XBT_PUBLIC(const char *) MSG_task_get_category (msg_task_t task);
 
 /************************** Task handling ************************************/
 XBT_PUBLIC(MSG_error_t)
 
 /************************** Task handling ************************************/
 XBT_PUBLIC(MSG_error_t)
-    MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t * task,
+    MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, msg_task_t * task,
                          msg_host_t host, double timeout);
 
 XBT_PUBLIC(MSG_error_t)
                          msg_host_t host, double timeout);
 
 XBT_PUBLIC(MSG_error_t)
-    MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
+    MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, msg_task_t task,
                              double timeout);
 
 /************************** Action handling **********************************/
                              double timeout);
 
 /************************** Action handling **********************************/
@@ -279,22 +279,22 @@ XBT_PUBLIC(msg_host_t *) MSG_get_host_table(void);
 #define MSG_process_change_host(h) MSG_process_migrate(MSG_process_self(),h);
 XBT_PUBLIC(MSG_error_t) MSG_get_errno(void);
 
 #define MSG_process_change_host(h) MSG_process_migrate(MSG_process_self(),h);
 XBT_PUBLIC(MSG_error_t) MSG_get_errno(void);
 
-XBT_PUBLIC(MSG_error_t) MSG_task_get(m_task_t * task, m_channel_t channel);
-XBT_PUBLIC(MSG_error_t) MSG_task_get_with_timeout(m_task_t * task,
+XBT_PUBLIC(MSG_error_t) MSG_task_get(msg_task_t * task, m_channel_t channel);
+XBT_PUBLIC(MSG_error_t) MSG_task_get_with_timeout(msg_task_t * task,
                                                   m_channel_t channel,
                                                   double max_duration);
                                                   m_channel_t channel,
                                                   double max_duration);
-XBT_PUBLIC(MSG_error_t) MSG_task_get_from_host(m_task_t * task,
+XBT_PUBLIC(MSG_error_t) MSG_task_get_from_host(msg_task_t * task,
                                                int channel, msg_host_t host);
                                                int channel, msg_host_t host);
-XBT_PUBLIC(MSG_error_t) MSG_task_get_ext(m_task_t * task, int channel,
+XBT_PUBLIC(MSG_error_t) MSG_task_get_ext(msg_task_t * task, int channel,
                                          double max_duration,
                                          msg_host_t host);
                                          double max_duration,
                                          msg_host_t host);
-XBT_PUBLIC(MSG_error_t) MSG_task_put(m_task_t task, msg_host_t dest,
+XBT_PUBLIC(MSG_error_t) MSG_task_put(msg_task_t task, msg_host_t dest,
                                      m_channel_t channel);
                                      m_channel_t channel);
-XBT_PUBLIC(MSG_error_t) MSG_task_put_bounded(m_task_t task,
+XBT_PUBLIC(MSG_error_t) MSG_task_put_bounded(msg_task_t task,
                                              msg_host_t dest,
                                              m_channel_t channel,
                                              double max_rate);
                                              msg_host_t dest,
                                              m_channel_t channel,
                                              double max_rate);
-XBT_PUBLIC(MSG_error_t) MSG_task_put_with_timeout(m_task_t task,
+XBT_PUBLIC(MSG_error_t) MSG_task_put_with_timeout(msg_task_t task,
                                                   msg_host_t dest,
                                                   m_channel_t channel,
                                                   double max_duration);
                                                   msg_host_t dest,
                                                   m_channel_t channel,
                                                   double max_duration);
index f257821..61071b8 100644 (file)
@@ -65,7 +65,7 @@ static int l_comm_wait(lua_State* L) {
   MSG_error_t res = MSG_comm_wait(comm, timeout);
 
   if (res == MSG_OK) {
   MSG_error_t res = MSG_comm_wait(comm, timeout);
 
   if (res == MSG_OK) {
-    m_task_t task = MSG_comm_get_task(comm);
+    msg_task_t task = MSG_comm_get_task(comm);
     if (MSG_task_get_sender(task) == MSG_process_self()) {
       /* I'm the sender */
       return 0;
     if (MSG_task_get_sender(task) == MSG_process_self()) {
       /* I'm the sender */
       return 0;
@@ -114,7 +114,7 @@ static int l_comm_test(lua_State* L) {
     MSG_error_t res = MSG_comm_get_status(comm);
 
     if (res == MSG_OK) {
     MSG_error_t res = MSG_comm_get_status(comm);
 
     if (res == MSG_OK) {
-      m_task_t task = MSG_comm_get_task(comm);
+      msg_task_t task = MSG_comm_get_task(comm);
       if (MSG_task_get_sender(task) == MSG_process_self()) {
         /* I'm the sender */
         lua_pushboolean(L, 1);
       if (MSG_task_get_sender(task) == MSG_process_self()) {
         /* I'm the sender */
         lua_pushboolean(L, 1);
index e0babb2..373bd32 100644 (file)
@@ -10,9 +10,9 @@
 #include "msg/msg.h"
 
 void sglua_register_task_functions(lua_State* L);
 #include "msg/msg.h"
 
 void sglua_register_task_functions(lua_State* L);
-m_task_t sglua_check_task(lua_State* L, int index);
+msg_task_t sglua_check_task(lua_State* L, int index);
 void sglua_task_register(lua_State* L);
 void sglua_task_register(lua_State* L);
-void sglua_task_unregister(lua_State* L, m_task_t task);
+void sglua_task_unregister(lua_State* L, msg_task_t task);
 
 void sglua_register_comm_functions(lua_State* L);
 msg_comm_t sglua_check_comm(lua_State* L, int index);
 
 void sglua_register_comm_functions(lua_State* L);
 msg_comm_t sglua_check_comm(lua_State* L, int index);
index 1326b2a..e9c32d2 100644 (file)
@@ -23,14 +23,14 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lua_task, bindings, "Lua bindings (task module)"
  * \param index an index in the Lua stack
  * \return the C task corresponding to this Lua task
  */
  * \param index an index in the Lua stack
  * \return the C task corresponding to this Lua task
  */
-m_task_t sglua_check_task(lua_State* L, int index)
+msg_task_t sglua_check_task(lua_State* L, int index)
 {
   sglua_stack_dump("check task: ", L);
   luaL_checktype(L, index, LUA_TTABLE);
                                   /* ... task ... */
   lua_getfield(L, index, "__simgrid_task");
                                   /* ... task ... ctask */
 {
   sglua_stack_dump("check task: ", L);
   luaL_checktype(L, index, LUA_TTABLE);
                                   /* ... task ... */
   lua_getfield(L, index, "__simgrid_task");
                                   /* ... task ... ctask */
-  m_task_t task = *((m_task_t*) luaL_checkudata(L, -1, TASK_MODULE_NAME));
+  msg_task_t task = *((msg_task_t*) luaL_checkudata(L, -1, TASK_MODULE_NAME));
   lua_pop(L, 1);
                                   /* ... task ... */
 
   lua_pop(L, 1);
                                   /* ... task ... */
 
@@ -66,7 +66,7 @@ static int l_task_new(lua_State* L)
                                   /* name comp comm */
   lua_settop(L, 0);
                                   /* -- */
                                   /* name comp comm */
   lua_settop(L, 0);
                                   /* -- */
-  m_task_t msg_task = MSG_task_create(name, comp_size, msg_size, NULL);
+  msg_task_t msg_task = MSG_task_create(name, comp_size, msg_size, NULL);
 
   lua_newtable(L);
                                   /* task */
 
   lua_newtable(L);
                                   /* task */
@@ -74,7 +74,7 @@ static int l_task_new(lua_State* L)
                                   /* task mt */
   lua_setmetatable(L, -2);
                                   /* task */
                                   /* task mt */
   lua_setmetatable(L, -2);
                                   /* task */
-  m_task_t* lua_task = (m_task_t*) lua_newuserdata(L, sizeof(m_task_t));
+  msg_task_t* lua_task = (msg_task_t*) lua_newuserdata(L, sizeof(msg_task_t));
                                   /* task ctask */
   *lua_task = msg_task;
   luaL_getmetatable(L, TASK_MODULE_NAME);
                                   /* task ctask */
   *lua_task = msg_task;
   luaL_getmetatable(L, TASK_MODULE_NAME);
@@ -96,7 +96,7 @@ static int l_task_new(lua_State* L)
  */
 static int l_task_get_name(lua_State* L)
 {
  */
 static int l_task_get_name(lua_State* L)
 {
-  m_task_t task = sglua_check_task(L, 1);
+  msg_task_t task = sglua_check_task(L, 1);
   lua_pushstring(L, MSG_task_get_name(task));
   return 1;
 }
   lua_pushstring(L, MSG_task_get_name(task));
   return 1;
 }
@@ -111,7 +111,7 @@ static int l_task_get_name(lua_State* L)
  */
 static int l_task_get_computation_duration(lua_State* L)
 {
  */
 static int l_task_get_computation_duration(lua_State* L)
 {
-  m_task_t task = sglua_check_task(L, 1);
+  msg_task_t task = sglua_check_task(L, 1);
   lua_pushnumber(L, MSG_task_get_compute_duration(task));
   return 1;
 }
   lua_pushnumber(L, MSG_task_get_compute_duration(task));
   return 1;
 }
@@ -128,7 +128,7 @@ static int l_task_get_computation_duration(lua_State* L)
  */
 static int l_task_execute(lua_State* L)
 {
  */
 static int l_task_execute(lua_State* L)
 {
-  m_task_t task = sglua_check_task(L, 1);
+  msg_task_t task = sglua_check_task(L, 1);
   MSG_error_t res = MSG_task_execute(task);
 
   if (res == MSG_OK) {
   MSG_error_t res = MSG_task_execute(task);
 
   if (res == MSG_OK) {
@@ -147,7 +147,7 @@ static int l_task_execute(lua_State* L)
  */
 void sglua_task_register(lua_State* L) {
 
  */
 void sglua_task_register(lua_State* L) {
 
-  m_task_t task = sglua_check_task(L, -1);
+  msg_task_t task = sglua_check_task(L, -1);
                                   /* ... task */
   /* put in the C task a ref to the lua task so that the receiver finds it */
   unsigned long ref = luaL_ref(L, LUA_REGISTRYINDEX);
                                   /* ... task */
   /* put in the C task a ref to the lua task so that the receiver finds it */
   unsigned long ref = luaL_ref(L, LUA_REGISTRYINDEX);
@@ -164,7 +164,7 @@ void sglua_task_register(lua_State* L) {
  * \param L a lua state
  * \param task a C task
  */
  * \param L a lua state
  * \param task a C task
  */
-void sglua_task_unregister(lua_State* L, m_task_t task) {
+void sglua_task_unregister(lua_State* L, msg_task_t task) {
 
                                   /* ... */
   /* the task is in my registry, put it onto my stack */
 
                                   /* ... */
   /* the task is in my registry, put it onto my stack */
@@ -192,7 +192,7 @@ void sglua_task_unregister(lua_State* L, m_task_t task) {
  * \param src_process the sender
  * \param dst_process the receiver
  */
  * \param src_process the sender
  * \param dst_process the receiver
  */
-static void task_copy_callback(m_task_t task, msg_process_t src_process,
+static void task_copy_callback(msg_task_t task, msg_process_t src_process,
     msg_process_t dst_process) {
 
   lua_State* src = MSG_process_get_data(src_process);
     msg_process_t dst_process) {
 
   lua_State* src = MSG_process_get_data(src_process);
@@ -212,7 +212,7 @@ static void task_copy_callback(m_task_t task, msg_process_t src_process,
    * make the sender forget the C task so that it doesn't garbage */
   lua_getfield(src, -1, "__simgrid_task");
                                   /* src: ... task ctask */
    * make the sender forget the C task so that it doesn't garbage */
   lua_getfield(src, -1, "__simgrid_task");
                                   /* src: ... task ctask */
-  m_task_t* udata = (m_task_t*) luaL_checkudata(src, -1, TASK_MODULE_NAME);
+  msg_task_t* udata = (msg_task_t*) luaL_checkudata(src, -1, TASK_MODULE_NAME);
   *udata = NULL;
   lua_pop(src, 2);
                                   /* src: ... */
   *udata = NULL;
   lua_pop(src, 2);
                                   /* src: ... */
@@ -233,7 +233,7 @@ static void task_copy_callback(m_task_t task, msg_process_t src_process,
  */
 static int l_task_send(lua_State* L)
 {
  */
 static int l_task_send(lua_State* L)
 {
-  m_task_t task = sglua_check_task(L, 1);
+  msg_task_t task = sglua_check_task(L, 1);
   const char* mailbox = luaL_checkstring(L, 2);
   double timeout;
   if (lua_gettop(L) >= 3) {
   const char* mailbox = luaL_checkstring(L, 2);
   double timeout;
   if (lua_gettop(L) >= 3) {
@@ -281,7 +281,7 @@ static int l_task_send(lua_State* L)
  */
 static int l_task_isend(lua_State* L)
 {
  */
 static int l_task_isend(lua_State* L)
 {
-  m_task_t task = sglua_check_task(L, 1);
+  msg_task_t task = sglua_check_task(L, 1);
   const char* mailbox = luaL_checkstring(L, 2);
                                   /* task mailbox ... */
   lua_settop(L, 1);
   const char* mailbox = luaL_checkstring(L, 2);
                                   /* task mailbox ... */
   lua_settop(L, 1);
@@ -312,7 +312,7 @@ static int l_task_isend(lua_State* L)
  */
 static int l_task_dsend(lua_State* L)
 {
  */
 static int l_task_dsend(lua_State* L)
 {
-  m_task_t task = sglua_check_task(L, 1);
+  msg_task_t task = sglua_check_task(L, 1);
   const char* mailbox = luaL_checkstring(L, 2);
                                   /* task mailbox ... */
   lua_settop(L, 1);
   const char* mailbox = luaL_checkstring(L, 2);
                                   /* task mailbox ... */
   lua_settop(L, 1);
@@ -336,7 +336,7 @@ static int l_task_dsend(lua_State* L)
  */
 static int l_task_recv(lua_State* L)
 {
  */
 static int l_task_recv(lua_State* L)
 {
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   const char* mailbox = luaL_checkstring(L, 1);
   double timeout;
   if (lua_gettop(L) >= 2) {
   const char* mailbox = luaL_checkstring(L, 1);
   double timeout;
   if (lua_gettop(L) >= 2) {
@@ -383,7 +383,7 @@ static int l_task_irecv(lua_State* L)
 {
   const char* mailbox = luaL_checkstring(L, 1);
                                   /* mailbox ... */
 {
   const char* mailbox = luaL_checkstring(L, 1);
                                   /* mailbox ... */
-  m_task_t* task = xbt_new0(m_task_t, 1); // FIXME fix this leak
+  msg_task_t* task = xbt_new0(msg_task_t, 1); // FIXME fix this leak
   msg_comm_t comm = MSG_task_irecv(task, mailbox);
   sglua_push_comm(L, comm);
                                   /* mailbox ... comm */
   msg_comm_t comm = MSG_task_irecv(task, mailbox);
   sglua_push_comm(L, comm);
                                   /* mailbox ... comm */
@@ -414,7 +414,7 @@ static const luaL_reg task_functions[] = {
 static int l_task_gc(lua_State* L)
 {
                                   /* ctask */
 static int l_task_gc(lua_State* L)
 {
                                   /* ctask */
-  m_task_t task = *((m_task_t*) luaL_checkudata(L, 1, TASK_MODULE_NAME));
+  msg_task_t task = *((msg_task_t*) luaL_checkudata(L, 1, TASK_MODULE_NAME));
   /* the task is NULL if I sent it to someone else */
   if (task != NULL) {
     MSG_task_destroy(task);
   /* the task is NULL if I sent it to someone else */
   if (task != NULL) {
     MSG_task_destroy(task);
@@ -432,7 +432,7 @@ static int l_task_gc(lua_State* L)
  */
 static int l_task_tostring(lua_State* L)
 {
  */
 static int l_task_tostring(lua_State* L)
 {
-  m_task_t task = *((m_task_t*) luaL_checkudata(L, 1, TASK_MODULE_NAME));
+  msg_task_t task = *((msg_task_t*) luaL_checkudata(L, 1, TASK_MODULE_NAME));
   lua_pushfstring(L, "Task: %p", task);
   return 1;
 }
   lua_pushfstring(L, "Task: %p", task);
   return 1;
 }
index d190e9a..75b05ba 100644 (file)
@@ -10,7 +10,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_msg, instr, "MSG");
 
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_msg, instr, "MSG");
 
-void TRACE_msg_set_task_category(m_task_t task, const char *category)
+void TRACE_msg_set_task_category(msg_task_t task, const char *category)
 {
   xbt_assert(task->category == NULL, "Task %p(%s) already has a category (%s).",
       task, task->name, task->category);
 {
   xbt_assert(task->category == NULL, "Task %p(%s) already has a category (%s).",
       task, task->name, task->category);
@@ -29,7 +29,7 @@ void TRACE_msg_set_task_category(m_task_t task, const char *category)
 }
 
 /* MSG_task_create related function*/
 }
 
 /* MSG_task_create related function*/
-void TRACE_msg_task_create(m_task_t task)
+void TRACE_msg_task_create(msg_task_t task)
 {
   static long long counter = 0;
   task->counter = counter++;
 {
   static long long counter = 0;
   task->counter = counter++;
@@ -38,7 +38,7 @@ void TRACE_msg_task_create(m_task_t task)
 }
 
 /* MSG_task_execute related functions */
 }
 
 /* MSG_task_execute related functions */
-void TRACE_msg_task_execute_start(m_task_t task)
+void TRACE_msg_task_execute_start(msg_task_t task)
 {
   XBT_DEBUG("EXEC,in %p, %lld, %s", task, task->counter, task->category);
 
 {
   XBT_DEBUG("EXEC,in %p, %lld, %s", task, task->counter, task->category);
 
@@ -53,7 +53,7 @@ void TRACE_msg_task_execute_start(m_task_t task)
   }
 }
 
   }
 }
 
-void TRACE_msg_task_execute_end(m_task_t task)
+void TRACE_msg_task_execute_end(msg_task_t task)
 {
   XBT_DEBUG("EXEC,out %p, %lld, %s", task, task->counter, task->category);
 
 {
   XBT_DEBUG("EXEC,out %p, %lld, %s", task, task->counter, task->category);
 
@@ -68,7 +68,7 @@ void TRACE_msg_task_execute_end(m_task_t task)
 }
 
 /* MSG_task_destroy related functions */
 }
 
 /* MSG_task_destroy related functions */
-void TRACE_msg_task_destroy(m_task_t task)
+void TRACE_msg_task_destroy(msg_task_t task)
 {
   XBT_DEBUG("DESTROY %p, %lld, %s", task, task->counter, task->category);
 
 {
   XBT_DEBUG("DESTROY %p, %lld, %s", task, task->counter, task->category);
 
@@ -94,7 +94,7 @@ void TRACE_msg_task_get_start(void)
   }
 }
 
   }
 }
 
-void TRACE_msg_task_get_end(double start_time, m_task_t task)
+void TRACE_msg_task_get_end(double start_time, msg_task_t task)
 {
   XBT_DEBUG("GET,out %p, %lld, %s", task, task->counter, task->category);
 
 {
   XBT_DEBUG("GET,out %p, %lld, %s", task, task->counter, task->category);
 
@@ -114,7 +114,7 @@ void TRACE_msg_task_get_end(double start_time, m_task_t task)
 }
 
 /* MSG_task_put related functions */
 }
 
 /* MSG_task_put related functions */
-int TRACE_msg_task_put_start(m_task_t task)
+int TRACE_msg_task_put_start(msg_task_t task)
 {
   XBT_DEBUG("PUT,in %p, %lld, %s", task, task->counter, task->category);
 
 {
   XBT_DEBUG("PUT,in %p, %lld, %s", task, task->counter, task->category);
 
index bac966d..b8065ec 100644 (file)
@@ -104,14 +104,14 @@ void new_pajeEndLink (double timestamp, container_t container, type_t type, cont
 void new_pajeNewEvent (double timestamp, container_t container, type_t type, val_t value);
 
 /* declaration of instrumentation functions from msg_task_instr.c */
 void new_pajeNewEvent (double timestamp, container_t container, type_t type, val_t value);
 
 /* declaration of instrumentation functions from msg_task_instr.c */
-void TRACE_msg_set_task_category(m_task_t task, const char *category);
-void TRACE_msg_task_create(m_task_t task);
-void TRACE_msg_task_execute_start(m_task_t task);
-void TRACE_msg_task_execute_end(m_task_t task);
-void TRACE_msg_task_destroy(m_task_t task);
+void TRACE_msg_set_task_category(msg_task_t task, const char *category);
+void TRACE_msg_task_create(msg_task_t task);
+void TRACE_msg_task_execute_start(msg_task_t task);
+void TRACE_msg_task_execute_end(msg_task_t task);
+void TRACE_msg_task_destroy(msg_task_t task);
 void TRACE_msg_task_get_start(void);
 void TRACE_msg_task_get_start(void);
-void TRACE_msg_task_get_end(double start_time, m_task_t task);
-int TRACE_msg_task_put_start(m_task_t task);    //returns TRUE if the task_put_end must be called
+void TRACE_msg_task_get_end(double start_time, msg_task_t task);
+int TRACE_msg_task_put_start(msg_task_t task);    //returns TRUE if the task_put_end must be called
 void TRACE_msg_task_put_end(void);
 
 /* declaration of instrumentation functions from msg_process_instr.c */
 void TRACE_msg_task_put_end(void);
 
 /* declaration of instrumentation functions from msg_process_instr.c */
index c84dca9..72eb74e 100644 (file)
@@ -17,11 +17,11 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg,
  *
  * This function is used for describing the behavior of a process. It
  * takes only one parameter.
  *
  * This function is used for describing the behavior of a process. It
  * takes only one parameter.
- * \param task a #m_task_t to execute on the location on which the process is running.
+ * \param task a #msg_task_t to execute on the location on which the process is running.
  * \return #MSG_OK if the task was successfully completed, #MSG_TASK_CANCELED
  * or #MSG_HOST_FAILURE otherwise
  */
  * \return #MSG_OK if the task was successfully completed, #MSG_TASK_CANCELED
  * or #MSG_HOST_FAILURE otherwise
  */
-MSG_error_t MSG_task_execute(m_task_t task)
+MSG_error_t MSG_task_execute(msg_task_t task)
 {
   return MSG_parallel_task_execute(task);
 }
 {
   return MSG_parallel_task_execute(task);
 }
@@ -29,12 +29,12 @@ MSG_error_t MSG_task_execute(m_task_t task)
 /** \ingroup msg_task_usage
  * \brief Executes a parallel task and waits for its termination.
  *
 /** \ingroup msg_task_usage
  * \brief Executes a parallel task and waits for its termination.
  *
- * \param task a #m_task_t to execute on the location on which the process is running.
+ * \param task a #msg_task_t to execute on the location on which the process is running.
  *
  * \return #MSG_OK if the task was successfully completed, #MSG_TASK_CANCELED
  * or #MSG_HOST_FAILURE otherwise
  */
  *
  * \return #MSG_OK if the task was successfully completed, #MSG_TASK_CANCELED
  * or #MSG_HOST_FAILURE otherwise
  */
-MSG_error_t MSG_parallel_task_execute(m_task_t task)
+MSG_error_t MSG_parallel_task_execute(msg_task_t task)
 {
   xbt_ex_t e;
   simdata_task_t simdata = task->simdata;
 {
   xbt_ex_t e;
   simdata_task_t simdata = task->simdata;
@@ -171,7 +171,7 @@ MSG_error_t MSG_process_sleep(double nb_sec)
  *    simply compare the host names, for example. After sufficient testing, provide an example that
  *    we could add to the distribution, and your first contribution to SimGrid is ready. Thanks in advance.
  *
  *    simply compare the host names, for example. After sufficient testing, provide an example that
  *    we could add to the distribution, and your first contribution to SimGrid is ready. Thanks in advance.
  *
- * \param task a memory location for storing a #m_task_t.
+ * \param task a memory location for storing a #msg_task_t.
  * \param alias name of the mailbox to receive the task from
  * \param host a #msg_host_t host from where the task was sent
  *
  * \param alias name of the mailbox to receive the task from
  * \param host a #msg_host_t host from where the task was sent
  *
@@ -180,7 +180,7 @@ MSG_error_t MSG_process_sleep(double nb_sec)
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
  */
 MSG_error_t
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
  */
 MSG_error_t
-MSG_task_receive_from_host(m_task_t * task, const char *alias,
+MSG_task_receive_from_host(msg_task_t * task, const char *alias,
                            msg_host_t host)
 {
   return MSG_task_receive_ext(task, alias, -1, host);
                            msg_host_t host)
 {
   return MSG_task_receive_ext(task, alias, -1, host);
@@ -193,14 +193,14 @@ MSG_task_receive_from_host(m_task_t * task, const char *alias,
  * until the task is received. See #MSG_task_irecv
  * for receiving tasks asynchronously.
  *
  * until the task is received. See #MSG_task_irecv
  * for receiving tasks asynchronously.
  *
- * \param task a memory location for storing a #m_task_t.
+ * \param task a memory location for storing a #msg_task_t.
  * \param alias name of the mailbox to receive the task from
  *
  * \return Returns
  * #MSG_OK if the task was successfully received,
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
  */
  * \param alias name of the mailbox to receive the task from
  *
  * \return Returns
  * #MSG_OK if the task was successfully received,
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
  */
-MSG_error_t MSG_task_receive(m_task_t * task, const char *alias)
+MSG_error_t MSG_task_receive(msg_task_t * task, const char *alias)
 {
   return MSG_task_receive_with_timeout(task, alias, -1);
 }
 {
   return MSG_task_receive_with_timeout(task, alias, -1);
 }
@@ -213,7 +213,7 @@ MSG_error_t MSG_task_receive(m_task_t * task, const char *alias)
  * for receiving tasks asynchronously.  You can provide a -1 timeout
  * to obtain an infinite timeout.
  *
  * for receiving tasks asynchronously.  You can provide a -1 timeout
  * to obtain an infinite timeout.
  *
- * \param task a memory location for storing a #m_task_t.
+ * \param task a memory location for storing a #msg_task_t.
  * \param alias name of the mailbox to receive the task from
  * \param timeout is the maximum wait time for completion (if -1, this call is the same as #MSG_task_receive)
  *
  * \param alias name of the mailbox to receive the task from
  * \param timeout is the maximum wait time for completion (if -1, this call is the same as #MSG_task_receive)
  *
@@ -222,7 +222,7 @@ MSG_error_t MSG_task_receive(m_task_t * task, const char *alias)
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
  */
 MSG_error_t
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
  */
 MSG_error_t
-MSG_task_receive_with_timeout(m_task_t * task, const char *alias,
+MSG_task_receive_with_timeout(msg_task_t * task, const char *alias,
                               double timeout)
 {
   return MSG_task_receive_ext(task, alias, timeout, NULL);
                               double timeout)
 {
   return MSG_task_receive_ext(task, alias, timeout, NULL);
@@ -236,7 +236,7 @@ MSG_task_receive_with_timeout(m_task_t * task, const char *alias,
  * for receiving tasks asynchronously. You can provide a -1 timeout
  * to obtain an infinite timeout.
  *
  * for receiving tasks asynchronously. You can provide a -1 timeout
  * to obtain an infinite timeout.
  *
- * \param task a memory location for storing a #m_task_t.
+ * \param task a memory location for storing a #msg_task_t.
  * \param alias name of the mailbox to receive the task from
  * \param timeout is the maximum wait time for completion (provide -1 for no timeout)
  * \param host a #msg_host_t host from where the task was sent
  * \param alias name of the mailbox to receive the task from
  * \param timeout is the maximum wait time for completion (provide -1 for no timeout)
  * \param host a #msg_host_t host from where the task was sent
@@ -246,7 +246,7 @@ MSG_task_receive_with_timeout(m_task_t * task, const char *alias,
 * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
  */
 MSG_error_t
 * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
  */
 MSG_error_t
-MSG_task_receive_ext(m_task_t * task, const char *alias, double timeout,
+MSG_task_receive_ext(msg_task_t * task, const char *alias, double timeout,
                      msg_host_t host)
 {
   XBT_DEBUG
                      msg_host_t host)
 {
   XBT_DEBUG
@@ -262,11 +262,11 @@ MSG_task_receive_ext(m_task_t * task, const char *alias, double timeout,
  * This is a non blocking function: use MSG_comm_wait() or MSG_comm_test()
  * to end the communication.
  *
  * This is a non blocking function: use MSG_comm_wait() or MSG_comm_test()
  * to end the communication.
  *
- * \param task a #m_task_t to send on another location.
+ * \param task a #msg_task_t to send on another location.
  * \param alias name of the mailbox to sent the task to
  * \return the msg_comm_t communication created
  */
  * \param alias name of the mailbox to sent the task to
  * \return the msg_comm_t communication created
  */
-msg_comm_t MSG_task_isend(m_task_t task, const char *alias)
+msg_comm_t MSG_task_isend(msg_task_t task, const char *alias)
 {
   return MSG_task_isend_with_matching(task,alias,NULL,NULL);
 }
 {
   return MSG_task_isend_with_matching(task,alias,NULL,NULL);
 }
@@ -277,7 +277,7 @@ msg_comm_t MSG_task_isend(m_task_t task, const char *alias)
  * This is a non blocking function: use MSG_comm_wait() or MSG_comm_test()
  * to end the communication.
  *
  * This is a non blocking function: use MSG_comm_wait() or MSG_comm_test()
  * to end the communication.
  *
- * \param task a #m_task_t to send on another location.
+ * \param task a #msg_task_t to send on another location.
  * \param alias name of the mailbox to sent the task to
  * \param match_fun boolean function which parameters are:
  *        - match_data_provided_here
  * \param alias name of the mailbox to sent the task to
  * \param match_fun boolean function which parameters are:
  *        - match_data_provided_here
@@ -286,7 +286,7 @@ msg_comm_t MSG_task_isend(m_task_t task, const char *alias)
  * \param match_data user provided data passed to match_fun
  * \return the msg_comm_t communication created
  */
  * \param match_data user provided data passed to match_fun
  * \return the msg_comm_t communication created
  */
-XBT_INLINE msg_comm_t MSG_task_isend_with_matching(m_task_t task, const char *alias,
+XBT_INLINE msg_comm_t MSG_task_isend_with_matching(msg_task_t task, const char *alias,
     int (*match_fun)(void*,void*, smx_action_t),
     void *match_data)
 {
     int (*match_fun)(void*,void*, smx_action_t),
     void *match_data)
 {
@@ -332,13 +332,13 @@ XBT_INLINE msg_comm_t MSG_task_isend_with_matching(m_task_t task, const char *al
  * <a href="http://lists.gforge.inria.fr/pipermail/simgrid-user/2011-November/002649.html">this thread</a>
  * in the SimGrid-user mailing list archive.
  *
  * <a href="http://lists.gforge.inria.fr/pipermail/simgrid-user/2011-November/002649.html">this thread</a>
  * in the SimGrid-user mailing list archive.
  *
- * \param task a #m_task_t to send on another location.
+ * \param task a #msg_task_t to send on another location.
  * \param alias name of the mailbox to sent the task to
  * \param cleanup a function to destroy the task if the
  * communication fails, e.g. MSG_task_destroy
  * (if NULL, no function will be called)
  */
  * \param alias name of the mailbox to sent the task to
  * \param cleanup a function to destroy the task if the
  * communication fails, e.g. MSG_task_destroy
  * (if NULL, no function will be called)
  */
-void MSG_task_dsend(m_task_t task, const char *alias, void_f_pvoid_t cleanup)
+void MSG_task_dsend(msg_task_t task, const char *alias, void_f_pvoid_t cleanup)
 {
   simdata_task_t t_simdata = NULL;
   msg_process_t process = MSG_process_self();
 {
   simdata_task_t t_simdata = NULL;
   msg_process_t process = MSG_process_self();
@@ -370,11 +370,11 @@ void MSG_task_dsend(m_task_t task, const char *alias, void_f_pvoid_t cleanup)
  * This is a non blocking function: use MSG_comm_wait() or MSG_comm_test()
  * to end the communication.
  * 
  * This is a non blocking function: use MSG_comm_wait() or MSG_comm_test()
  * to end the communication.
  * 
- * \param task a memory location for storing a #m_task_t. has to be valid until the end of the communication.
+ * \param task a memory location for storing a #msg_task_t. has to be valid until the end of the communication.
  * \param name of the mailbox to receive the task on
  * \return the msg_comm_t communication created
  */
  * \param name of the mailbox to receive the task on
  * \return the msg_comm_t communication created
  */
-msg_comm_t MSG_task_irecv(m_task_t *task, const char *name)
+msg_comm_t MSG_task_irecv(msg_task_t *task, const char *name)
 {
   smx_rdv_t rdv = MSG_mailbox_get_by_alias(name);
 
 {
   smx_rdv_t rdv = MSG_mailbox_get_by_alias(name);
 
@@ -627,12 +627,12 @@ MSG_error_t MSG_comm_get_status(msg_comm_t comm) {
 }
 
 /** \ingroup msg_task_usage
 }
 
 /** \ingroup msg_task_usage
- * \brief Get a task (#m_task_t) from a communication
+ * \brief Get a task (#msg_task_t) from a communication
  *
  * \param comm the communication where to get the task
  * \return the task from the communication
  */
  *
  * \param comm the communication where to get the task
  * \return the task from the communication
  */
-m_task_t MSG_comm_get_task(msg_comm_t comm)
+msg_task_t MSG_comm_get_task(msg_comm_t comm)
 {
   xbt_assert(comm, "Invalid parameter");
 
 {
   xbt_assert(comm, "Invalid parameter");
 
@@ -652,7 +652,7 @@ void MSG_comm_copy_data_from_SIMIX(smx_action_t comm, void* buff, size_t buff_si
 
   // notify the user callback if any
   if (msg_global->task_copy_callback) {
 
   // notify the user callback if any
   if (msg_global->task_copy_callback) {
-    m_task_t task = buff;
+    msg_task_t task = buff;
     msg_global->task_copy_callback(task,
         simcall_comm_get_src_proc(comm), simcall_comm_get_dst_proc(comm));
   }
     msg_global->task_copy_callback(task,
         simcall_comm_get_src_proc(comm), simcall_comm_get_dst_proc(comm));
   }
@@ -671,7 +671,7 @@ void MSG_comm_copy_data_from_SIMIX(smx_action_t comm, void* buff, size_t buff_si
  * \return Returns #MSG_OK if the task was successfully sent,
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
  */
  * \return Returns #MSG_OK if the task was successfully sent,
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
  */
-MSG_error_t MSG_task_send(m_task_t task, const char *alias)
+MSG_error_t MSG_task_send(msg_task_t task, const char *alias)
 {
   XBT_DEBUG("MSG_task_send: Trying to send a message on mailbox '%s'", alias);
   return MSG_task_send_with_timeout(task, alias, -1);
 {
   XBT_DEBUG("MSG_task_send: Trying to send a message on mailbox '%s'", alias);
   return MSG_task_send_with_timeout(task, alias, -1);
@@ -692,7 +692,7 @@ MSG_error_t MSG_task_send(m_task_t task, const char *alias)
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
  */
 MSG_error_t
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
  */
 MSG_error_t
-MSG_task_send_bounded(m_task_t task, const char *alias, double maxrate)
+MSG_task_send_bounded(msg_task_t task, const char *alias, double maxrate)
 {
   task->simdata->rate = maxrate;
   return MSG_task_send(task, alias);
 {
   task->simdata->rate = maxrate;
   return MSG_task_send(task, alias);
@@ -712,7 +712,7 @@ MSG_task_send_bounded(m_task_t task, const char *alias, double maxrate)
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
  */
 MSG_error_t
  * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
  */
 MSG_error_t
-MSG_task_send_with_timeout(m_task_t task, const char *alias,
+MSG_task_send_with_timeout(msg_task_t task, const char *alias,
                            double timeout)
 {
   return MSG_mailbox_put_with_timeout(MSG_mailbox_get_by_alias(alias),
                            double timeout)
 {
   return MSG_mailbox_put_with_timeout(MSG_mailbox_get_by_alias(alias),
@@ -759,7 +759,7 @@ int MSG_task_listen_from_host(const char *alias, msg_host_t host)
  */
 int MSG_task_listen_from(const char *alias)
 {
  */
 int MSG_task_listen_from(const char *alias)
 {
-  m_task_t task;
+  msg_task_t task;
 
   if (NULL ==
       (task = MSG_mailbox_get_head(MSG_mailbox_get_by_alias(alias))))
 
   if (NULL ==
       (task = MSG_mailbox_get_head(MSG_mailbox_get_by_alias(alias))))
@@ -787,7 +787,7 @@ int MSG_task_listen_from(const char *alias)
  *
  * \see MSG_task_get_category, TRACE_category, TRACE_category_with_color
  */
  *
  * \see MSG_task_get_category, TRACE_category, TRACE_category_with_color
  */
-void MSG_task_set_category (m_task_t task, const char *category)
+void MSG_task_set_category (msg_task_t task, const char *category)
 {
 #ifdef HAVE_TRACING
   TRACE_msg_set_task_category (task, category);
 {
 #ifdef HAVE_TRACING
   TRACE_msg_set_task_category (task, category);
@@ -804,7 +804,7 @@ void MSG_task_set_category (m_task_t task, const char *category)
  *
  * \return Returns the name of the tracing category of the given task, NULL otherwise
  */
  *
  * \return Returns the name of the tracing category of the given task, NULL otherwise
  */
-const char *MSG_task_get_category (m_task_t task)
+const char *MSG_task_get_category (msg_task_t task)
 {
 #ifdef HAVE_TRACING
   return task->category;
 {
 #ifdef HAVE_TRACING
   return task->category;
@@ -830,7 +830,7 @@ MSG_error_t MSG_get_errno(void)
  *
  * This function is used for describing the behavior of a process. It
  * takes three parameter.
  *
  * This function is used for describing the behavior of a process. It
  * takes three parameter.
- * \param task a #m_task_t to send on another location. This task
+ * \param task a #msg_task_t to send on another location. This task
  will not be usable anymore when the function will return. There is
  no automatic task duplication and you have to save your parameters
  before calling this function. Tasks are unique and once it has been
  will not be usable anymore when the function will return. There is
  no automatic task duplication and you have to save your parameters
  before calling this function. Tasks are unique and once it has been
@@ -849,7 +849,7 @@ MSG_error_t MSG_get_errno(void)
  * #MSG_TRANSFER_FAILURE if the transfer could not be properly done
  * (network failure, dest failure) or #MSG_OK if it succeeded.
  */
  * #MSG_TRANSFER_FAILURE if the transfer could not be properly done
  * (network failure, dest failure) or #MSG_OK if it succeeded.
  */
-MSG_error_t MSG_task_put(m_task_t task, msg_host_t dest, m_channel_t channel)
+MSG_error_t MSG_task_put(msg_task_t task, msg_host_t dest, m_channel_t channel)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_send");
   return MSG_task_put_with_timeout(task, dest, channel, -1.0);
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_send");
   return MSG_task_put_with_timeout(task, dest, channel, -1.0);
@@ -862,7 +862,7 @@ MSG_error_t MSG_task_put(m_task_t task, msg_host_t dest, m_channel_t channel)
  * \sa MSG_task_put
  */
 MSG_error_t
  * \sa MSG_task_put
  */
 MSG_error_t
-MSG_task_put_bounded(m_task_t task, msg_host_t dest, m_channel_t channel,
+MSG_task_put_bounded(msg_task_t task, msg_host_t dest, m_channel_t channel,
                      double maxrate)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_send_bounded");
                      double maxrate)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_send_bounded");
@@ -878,7 +878,7 @@ MSG_task_put_bounded(m_task_t task, msg_host_t dest, m_channel_t channel,
  *
  * This function is used for describing the behavior of a process. It
  * takes four parameter.
  *
  * This function is used for describing the behavior of a process. It
  * takes four parameter.
- * \param task a #m_task_t to send on another location. This task
+ * \param task a #msg_task_t to send on another location. This task
  will not be usable anymore when the function will return. There is
  no automatic task duplication and you have to save your parameters
  before calling this function. Tasks are unique and once it has been
  will not be usable anymore when the function will return. There is
  no automatic task duplication and you have to save your parameters
  before calling this function. Tasks are unique and once it has been
@@ -901,7 +901,7 @@ this function was called was shut down,
 (network failure, dest failure, timeout...) or #MSG_OK if the communication succeeded.
  */
 MSG_error_t
 (network failure, dest failure, timeout...) or #MSG_OK if the communication succeeded.
  */
 MSG_error_t
-MSG_task_put_with_timeout(m_task_t task, msg_host_t dest,
+MSG_task_put_with_timeout(msg_task_t task, msg_host_t dest,
                           m_channel_t channel, double timeout)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_send_with_timeout");
                           m_channel_t channel, double timeout)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_send_with_timeout");
@@ -927,7 +927,7 @@ MSG_task_put_with_timeout(m_task_t task, msg_host_t dest,
 int MSG_task_probe_from(m_channel_t channel)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_listen_from");
 int MSG_task_probe_from(m_channel_t channel)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_listen_from");
-  m_task_t task;
+  msg_task_t task;
 
   xbt_assert((channel >= 0)
               && (channel < msg_global->max_channel), "Invalid channel %d",
 
   xbt_assert((channel >= 0)
               && (channel < msg_global->max_channel), "Invalid channel %d",
@@ -994,7 +994,7 @@ int MSG_task_probe_from_host(int channel, msg_host_t host)
  * \brief Listen on \a channel and waits for receiving a task from \a host.
  *
  * It takes three parameters.
  * \brief Listen on \a channel and waits for receiving a task from \a host.
  *
  * It takes three parameters.
- * \param task a memory location for storing a #m_task_t. It will
+ * \param task a memory location for storing a #msg_task_t. It will
  hold a task when this function will return. Thus \a task should not
  be equal to \c NULL and \a *task should be equal to \c NULL. If one of
  those two condition does not hold, there will be a warning message.
  hold a task when this function will return. Thus \a task should not
  be equal to \c NULL and \a *task should be equal to \c NULL. If one of
  those two condition does not hold, there will be a warning message.
@@ -1005,7 +1005,7 @@ int MSG_task_probe_from_host(int channel, msg_host_t host)
  * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
  */
 MSG_error_t
  * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
  */
 MSG_error_t
-MSG_task_get_from_host(m_task_t * task, m_channel_t channel, msg_host_t host)
+MSG_task_get_from_host(msg_task_t * task, m_channel_t channel, msg_host_t host)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_receive_from_host");
   return MSG_task_get_ext(task, channel, -1, host);
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_receive_from_host");
   return MSG_task_get_ext(task, channel, -1, host);
@@ -1015,7 +1015,7 @@ MSG_task_get_from_host(m_task_t * task, m_channel_t channel, msg_host_t host)
  * \brief Listen on a channel and wait for receiving a task.
  *
  * It takes two parameters.
  * \brief Listen on a channel and wait for receiving a task.
  *
  * It takes two parameters.
- * \param task a memory location for storing a #m_task_t. It will
+ * \param task a memory location for storing a #msg_task_t. It will
  hold a task when this function will return. Thus \a task should not
  be equal to \c NULL and \a *task should be equal to \c NULL. If one of
  those two condition does not hold, there will be a warning message.
  hold a task when this function will return. Thus \a task should not
  be equal to \c NULL and \a *task should be equal to \c NULL. If one of
  those two condition does not hold, there will be a warning message.
@@ -1024,7 +1024,7 @@ MSG_task_get_from_host(m_task_t * task, m_channel_t channel, msg_host_t host)
  number of channels fixed with MSG_set_channel_number().
  * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
  */
  number of channels fixed with MSG_set_channel_number().
  * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
  */
-MSG_error_t MSG_task_get(m_task_t * task, m_channel_t channel)
+MSG_error_t MSG_task_get(msg_task_t * task, m_channel_t channel)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_receive");
   return MSG_task_get_with_timeout(task, channel, -1);
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_receive");
   return MSG_task_get_with_timeout(task, channel, -1);
@@ -1034,7 +1034,7 @@ MSG_error_t MSG_task_get(m_task_t * task, m_channel_t channel)
  * \brief Listen on a channel and wait for receiving a task with a timeout.
  *
  * It takes three parameters.
  * \brief Listen on a channel and wait for receiving a task with a timeout.
  *
  * It takes three parameters.
- * \param task a memory location for storing a #m_task_t. It will
+ * \param task a memory location for storing a #msg_task_t. It will
  hold a task when this function will return. Thus \a task should not
  be equal to \c NULL and \a *task should be equal to \c NULL. If one of
  those two condition does not hold, there will be a warning message.
  hold a task when this function will return. Thus \a task should not
  be equal to \c NULL and \a *task should be equal to \c NULL. If one of
  those two condition does not hold, there will be a warning message.
@@ -1048,7 +1048,7 @@ MSG_error_t MSG_task_get(m_task_t * task, m_channel_t channel)
  * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
  */
 MSG_error_t
  * \return a #MSG_error_t indicating whether the operation was successful (#MSG_OK), or why it failed otherwise.
  */
 MSG_error_t
-MSG_task_get_with_timeout(m_task_t * task, m_channel_t channel,
+MSG_task_get_with_timeout(msg_task_t * task, m_channel_t channel,
                           double max_duration)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_receive_with_timeout");
                           double max_duration)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_receive_with_timeout");
@@ -1056,7 +1056,7 @@ MSG_task_get_with_timeout(m_task_t * task, m_channel_t channel,
 }
 
 MSG_error_t
 }
 
 MSG_error_t
-MSG_task_get_ext(m_task_t * task, m_channel_t channel, double timeout,
+MSG_task_get_ext(msg_task_t * task, m_channel_t channel, double timeout,
                  msg_host_t host)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_receive_ext");
                  msg_host_t host)
 {
   XBT_WARN("DEPRECATED! Now use MSG_task_receive_ext");
index e93ee57..6a1ee8f 100644 (file)
@@ -27,14 +27,14 @@ int MSG_mailbox_is_empty(msg_mailbox_t mailbox)
   return (NULL == simcall_rdv_get_head(mailbox));
 }
 
   return (NULL == simcall_rdv_get_head(mailbox));
 }
 
-m_task_t MSG_mailbox_get_head(msg_mailbox_t mailbox)
+msg_task_t MSG_mailbox_get_head(msg_mailbox_t mailbox)
 {
   smx_action_t comm = simcall_rdv_get_head(mailbox);
 
   if (!comm)
     return NULL;
 
 {
   smx_action_t comm = simcall_rdv_get_head(mailbox);
 
   if (!comm)
     return NULL;
 
-  return (m_task_t) simcall_comm_get_src_data(comm);
+  return (msg_task_t) simcall_comm_get_src_data(comm);
 }
 
 int
 }
 
 int
@@ -57,7 +57,7 @@ msg_mailbox_t MSG_mailbox_get_by_alias(const char *alias)
 }
 
 MSG_error_t
 }
 
 MSG_error_t
-MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t * task,
+MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, msg_task_t * task,
                          msg_host_t host, double timeout)
 {
   xbt_ex_t e;
                          msg_host_t host, double timeout)
 {
   xbt_ex_t e;
@@ -109,7 +109,7 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t * task,
 }
 
 MSG_error_t
 }
 
 MSG_error_t
-MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
+MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, msg_task_t task,
                              double timeout)
 {
   xbt_ex_t e;
                              double timeout)
 {
   xbt_ex_t e;
index 1b01692..ded6199 100644 (file)
@@ -76,7 +76,7 @@ XBT_PUBLIC(int) MSG_mailbox_is_empty(msg_mailbox_t mailbox);
  *
  * \return    The task at the head of the mailbox.
  */
  *
  * \return    The task at the head of the mailbox.
  */
-XBT_PUBLIC(m_task_t)
+XBT_PUBLIC(msg_task_t)
     MSG_mailbox_get_head(msg_mailbox_t mailbox);
 
 /*! \brief MSG_mailbox_get_count_host_waiting_tasks - Return the number of tasks
     MSG_mailbox_get_head(msg_mailbox_t mailbox);
 
 /*! \brief MSG_mailbox_get_count_host_waiting_tasks - Return the number of tasks
index 2b3e69b..4b13c5e 100644 (file)
@@ -66,7 +66,7 @@ typedef struct simdata_process {
   m_channel_t put_channel;      /* used for debugging purposes */
 #endif
   smx_action_t waiting_action;
   m_channel_t put_channel;      /* used for debugging purposes */
 #endif
   smx_action_t waiting_action;
-  m_task_t waiting_task;
+  msg_task_t waiting_task;
   char **argv;                  /* arguments table if any */
   int argc;                     /* arguments number if any */
   MSG_error_t last_errno;       /* the last value returned by a MSG_function */
   char **argv;                  /* arguments table if any */
   int argc;                     /* arguments number if any */
   MSG_error_t last_errno;       /* the last value returned by a MSG_function */
@@ -88,8 +88,8 @@ typedef struct process_arg {
 
 typedef struct msg_comm {
   smx_action_t s_comm;          /* SIMIX communication object encapsulated (the same for both processes) */
 
 typedef struct msg_comm {
   smx_action_t s_comm;          /* SIMIX communication object encapsulated (the same for both processes) */
-  m_task_t task_sent;           /* task sent (NULL for the receiver) */
-  m_task_t *task_received;      /* where the task will be received (NULL for the sender) */
+  msg_task_t task_sent;           /* task sent (NULL for the receiver) */
+  msg_task_t *task_received;      /* where the task will be received (NULL for the sender) */
   MSG_error_t status;           /* status of the communication once finished */
 } s_msg_comm_t;
 
   MSG_error_t status;           /* status of the communication once finished */
 } s_msg_comm_t;
 
@@ -115,7 +115,7 @@ typedef struct MSG_Global {
   int PID;
   int session;
   unsigned long int sent_msg;   /* Total amount of messages sent during the simulation */
   int PID;
   int session;
   unsigned long int sent_msg;   /* Total amount of messages sent during the simulation */
-  void (*task_copy_callback) (m_task_t task, msg_process_t src, msg_process_t dst);
+  void (*task_copy_callback) (msg_task_t task, msg_process_t src, msg_process_t dst);
   void_f_pvoid_t process_data_cleanup;
   xbt_swag_t vms;
 } s_MSG_Global_t, *MSG_Global_t;
   void_f_pvoid_t process_data_cleanup;
   xbt_swag_t vms;
 } s_MSG_Global_t, *MSG_Global_t;
index 6c87550..821f6b3 100644 (file)
@@ -106,7 +106,7 @@ msg_process_t MSG_process_create(const char *name,
    m_process_management (to create a new #msg_process_t for example),
    in \ref m_host_management (only the read-only functions i.e. whose
    name contains the word get), in \ref m_task_management (to create
    m_process_management (to create a new #msg_process_t for example),
    in \ref m_host_management (only the read-only functions i.e. whose
    name contains the word get), in \ref m_task_management (to create
-   or destroy some #m_task_t for example) and in \ref
+   or destroy some #msg_task_t for example) and in \ref
    msg_task_usage (to handle file transfers and task processing).
  * \param data a pointer to any data one may want to attach to the new
    object.  It is for user-level information and can be NULL. It can
    msg_task_usage (to handle file transfers and task processing).
  * \param data a pointer to any data one may want to attach to the new
    object.  It is for user-level information and can be NULL. It can
@@ -140,7 +140,7 @@ msg_process_t MSG_process_create_with_arguments(const char *name,
    m_process_management (to create a new #msg_process_t for example),
    in \ref m_host_management (only the read-only functions i.e. whose
    name contains the word get), in \ref m_task_management (to create
    m_process_management (to create a new #msg_process_t for example),
    in \ref m_host_management (only the read-only functions i.e. whose
    name contains the word get), in \ref m_task_management (to create
-   or destroy some #m_task_t for example) and in \ref
+   or destroy some #msg_task_t for example) and in \ref
    msg_task_usage (to handle file transfers and task processing).
  * \param data a pointer to any data one may want to attach to the new
    object.  It is for user-level information and can be NULL. It can
    msg_task_usage (to handle file transfers and task processing).
  * \param data a pointer to any data one may want to attach to the new
    object.  It is for user-level information and can be NULL. It can
index ab9cc80..74151b9 100644 (file)
@@ -24,9 +24,9 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_task, msg,
 
 /********************************* Task **************************************/
 /** \ingroup m_task_management
 
 /********************************* Task **************************************/
 /** \ingroup m_task_management
- * \brief Creates a new #m_task_t.
+ * \brief Creates a new #msg_task_t.
  *
  *
- * A constructor for #m_task_t taking four arguments and returning the 
+ * A constructor for #msg_task_t taking four arguments and returning the
    corresponding object.
  * \param name a name for the object. It is for user-level information
    and can be NULL.
    corresponding object.
  * \param name a name for the object. It is for user-level information
    and can be NULL.
@@ -39,13 +39,13 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_task, msg,
  * \param data a pointer to any data may want to attach to the new
    object.  It is for user-level information and can be NULL. It can
    be retrieved with the function \ref MSG_task_get_data.
  * \param data a pointer to any data may want to attach to the new
    object.  It is for user-level information and can be NULL. It can
    be retrieved with the function \ref MSG_task_get_data.
- * \see m_task_t
+ * \see msg_task_t
  * \return The new corresponding object.
  */
  * \return The new corresponding object.
  */
-m_task_t MSG_task_create(const char *name, double compute_duration,
+msg_task_t MSG_task_create(const char *name, double compute_duration,
                          double message_size, void *data)
 {
                          double message_size, void *data)
 {
-  m_task_t task = xbt_new(s_m_task_t, 1);
+  msg_task_t task = xbt_new(s_msg_task_t, 1);
   simdata_task_t simdata = xbt_new(s_simdata_task_t, 1);
   task->simdata = simdata;
 
   simdata_task_t simdata = xbt_new(s_simdata_task_t, 1);
   task->simdata = simdata;
 
@@ -77,9 +77,9 @@ m_task_t MSG_task_create(const char *name, double compute_duration,
 }
 
 /** \ingroup m_task_management
 }
 
 /** \ingroup m_task_management
- * \brief Creates a new #m_task_t (a parallel one....).
+ * \brief Creates a new #msg_task_t (a parallel one....).
  *
  *
- * A constructor for #m_task_t taking six arguments and returning the
+ * A constructor for #msg_task_t taking six arguments and returning the
  corresponding object.
  * \param name a name for the object. It is for user-level information
  and can be NULL.
  corresponding object.
  * \param name a name for the object. It is for user-level information
  and can be NULL.
@@ -92,16 +92,16 @@ m_task_t MSG_task_create(const char *name, double compute_duration,
  * \param data a pointer to any data may want to attach to the new
  object.  It is for user-level information and can be NULL. It can
  be retrieved with the function \ref MSG_task_get_data.
  * \param data a pointer to any data may want to attach to the new
  object.  It is for user-level information and can be NULL. It can
  be retrieved with the function \ref MSG_task_get_data.
- * \see m_task_t
+ * \see msg_task_t
  * \return The new corresponding object.
  */
  * \return The new corresponding object.
  */
-m_task_t
+msg_task_t
 MSG_parallel_task_create(const char *name, int host_nb,
                          const msg_host_t * host_list,
                          double *computation_amount,
                          double *communication_amount, void *data)
 {
 MSG_parallel_task_create(const char *name, int host_nb,
                          const msg_host_t * host_list,
                          double *computation_amount,
                          double *communication_amount, void *data)
 {
-  m_task_t task = MSG_task_create(name, 0, 0, data);
+  msg_task_t task = MSG_task_create(name, 0, 0, data);
   simdata_task_t simdata = task->simdata;
   int i;
 
   simdata_task_t simdata = task->simdata;
   int i;
 
@@ -163,12 +163,12 @@ m_gpu_task_t MSG_gpu_task_create(const char *name, double compute_duration,
 /*************** End GPU ***************/
 
 /** \ingroup m_task_management
 /*************** End GPU ***************/
 
 /** \ingroup m_task_management
- * \brief Return the user data of a #m_task_t.
+ * \brief Return the user data of a #msg_task_t.
  *
  * This function checks whether \a task is a valid pointer or not and return
    the user data associated to \a task if it is possible.
  */
  *
  * This function checks whether \a task is a valid pointer or not and return
    the user data associated to \a task if it is possible.
  */
-void *MSG_task_get_data(m_task_t task)
+void *MSG_task_get_data(msg_task_t task)
 {
   xbt_assert((task != NULL), "Invalid parameter");
 
 {
   xbt_assert((task != NULL), "Invalid parameter");
 
@@ -176,12 +176,12 @@ void *MSG_task_get_data(m_task_t task)
 }
 
 /** \ingroup m_task_management
 }
 
 /** \ingroup m_task_management
- * \brief Sets the user data of a #m_task_t.
+ * \brief Sets the user data of a #msg_task_t.
  *
  * This function allows to associate a new pointer to
    the user data associated of \a task.
  */
  *
  * This function allows to associate a new pointer to
    the user data associated of \a task.
  */
-void MSG_task_set_data(m_task_t task, void *data)
+void MSG_task_set_data(msg_task_t task, void *data)
 {
   xbt_assert((task != NULL), "Invalid parameter");
 
 {
   xbt_assert((task != NULL), "Invalid parameter");
 
@@ -193,7 +193,7 @@ void MSG_task_set_data(m_task_t task, void *data)
  * \param callback a callback function
  */
 void MSG_task_set_copy_callback(void (*callback)
  * \param callback a callback function
  */
 void MSG_task_set_copy_callback(void (*callback)
-    (m_task_t task, msg_process_t sender, msg_process_t receiver)) {
+    (msg_task_t task, msg_process_t sender, msg_process_t receiver)) {
 
   msg_global->task_copy_callback = callback;
 
 
   msg_global->task_copy_callback = callback;
 
@@ -206,53 +206,53 @@ void MSG_task_set_copy_callback(void (*callback)
 }
 
 /** \ingroup m_task_management
 }
 
 /** \ingroup m_task_management
- * \brief Return the sender of a #m_task_t.
+ * \brief Return the sender of a #msg_task_t.
  *
  * This functions returns the #msg_process_t which sent this task
  */
  *
  * This functions returns the #msg_process_t which sent this task
  */
-msg_process_t MSG_task_get_sender(m_task_t task)
+msg_process_t MSG_task_get_sender(msg_task_t task)
 {
   xbt_assert(task, "Invalid parameters");
   return ((simdata_task_t) task->simdata)->sender;
 }
 
 /** \ingroup m_task_management
 {
   xbt_assert(task, "Invalid parameters");
   return ((simdata_task_t) task->simdata)->sender;
 }
 
 /** \ingroup m_task_management
- * \brief Return the source of a #m_task_t.
+ * \brief Return the source of a #msg_task_t.
  *
  * This functions returns the #msg_host_t from which this task was sent
  */
  *
  * This functions returns the #msg_host_t from which this task was sent
  */
-msg_host_t MSG_task_get_source(m_task_t task)
+msg_host_t MSG_task_get_source(msg_task_t task)
 {
   xbt_assert(task, "Invalid parameters");
   return ((simdata_task_t) task->simdata)->source;
 }
 
 /** \ingroup m_task_management
 {
   xbt_assert(task, "Invalid parameters");
   return ((simdata_task_t) task->simdata)->source;
 }
 
 /** \ingroup m_task_management
- * \brief Return the name of a #m_task_t.
+ * \brief Return the name of a #msg_task_t.
  *
  *
- * This functions returns the name of a #m_task_t as specified on creation
+ * This functions returns the name of a #msg_task_t as specified on creation
  */
  */
-const char *MSG_task_get_name(m_task_t task)
+const char *MSG_task_get_name(msg_task_t task)
 {
   xbt_assert(task, "Invalid parameters");
   return task->name;
 }
 
 /** \ingroup m_task_management
 {
   xbt_assert(task, "Invalid parameters");
   return task->name;
 }
 
 /** \ingroup m_task_management
- * \brief Sets the name of a #m_task_t.
+ * \brief Sets the name of a #msg_task_t.
  *
  * This functions allows to associate a name to a task
  */
  *
  * This functions allows to associate a name to a task
  */
-void MSG_task_set_name(m_task_t task, const char *name)
+void MSG_task_set_name(msg_task_t task, const char *name)
 {
   xbt_assert(task, "Invalid parameters");
   task->name = xbt_strdup(name);
 }
 
 /** \ingroup m_task_management
 {
   xbt_assert(task, "Invalid parameters");
   task->name = xbt_strdup(name);
 }
 
 /** \ingroup m_task_management
- * \brief Destroy a #m_task_t.
+ * \brief Destroy a #msg_task_t.
  *
  *
- * Destructor for #m_task_t. Note that you should free user data, if any, \b 
+ * Destructor for #msg_task_t. Note that you should free user data, if any, \b
  * before calling this function.
  *
  * Only the process that owns the task can destroy it.
  * before calling this function.
  *
  * Only the process that owns the task can destroy it.
@@ -261,7 +261,7 @@ void MSG_task_set_name(m_task_t task, const char *name)
  * supposed to destroy it. The sender should not use it anymore.
  * If the task failed to be sent, the sender remains the owner of the task.
  */
  * supposed to destroy it. The sender should not use it anymore.
  * If the task failed to be sent, the sender remains the owner of the task.
  */
-MSG_error_t MSG_task_destroy(m_task_t task)
+MSG_error_t MSG_task_destroy(msg_task_t task)
 {
   smx_action_t action = NULL;
   xbt_assert((task != NULL), "Invalid parameter");
 {
   smx_action_t action = NULL;
   xbt_assert((task != NULL), "Invalid parameter");
@@ -292,11 +292,11 @@ MSG_error_t MSG_task_destroy(m_task_t task)
 
 
 /** \ingroup m_task_usage
 
 
 /** \ingroup m_task_usage
- * \brief Cancel a #m_task_t.
+ * \brief Cancel a #msg_task_t.
  * \param task the task to cancel. If it was executed or transfered, it
           stops the process that were working on it.
  */
  * \param task the task to cancel. If it was executed or transfered, it
           stops the process that were working on it.
  */
-MSG_error_t MSG_task_cancel(m_task_t task)
+MSG_error_t MSG_task_cancel(msg_task_t task)
 {
   xbt_assert((task != NULL), "Invalid parameter");
 
 {
   xbt_assert((task != NULL), "Invalid parameter");
 
@@ -311,10 +311,10 @@ MSG_error_t MSG_task_cancel(m_task_t task)
 }
 
 /** \ingroup m_task_management
 }
 
 /** \ingroup m_task_management
- * \brief Returns the computation amount needed to process a task #m_task_t.
+ * \brief Returns the computation amount needed to process a task #msg_task_t.
  *        Once a task has been processed, this amount is thus set to 0...
  */
  *        Once a task has been processed, this amount is thus set to 0...
  */
-double MSG_task_get_compute_duration(m_task_t task)
+double MSG_task_get_compute_duration(msg_task_t task)
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
@@ -324,10 +324,10 @@ double MSG_task_get_compute_duration(m_task_t task)
 
 
 /** \ingroup m_task_management
 
 
 /** \ingroup m_task_management
- * \brief set the computation amount needed to process a task #m_task_t.
+ * \brief set the computation amount needed to process a task #msg_task_t.
  */
 
  */
 
-void MSG_task_set_compute_duration(m_task_t task,
+void MSG_task_set_compute_duration(msg_task_t task,
                                    double computation_amount)
 {
   xbt_assert(task, "Invalid parameter");
                                    double computation_amount)
 {
   xbt_assert(task, "Invalid parameter");
@@ -336,10 +336,10 @@ void MSG_task_set_compute_duration(m_task_t task,
 }
 
 /** \ingroup m_task_management
 }
 
 /** \ingroup m_task_management
- * \brief Returns the remaining computation amount of a task #m_task_t.
+ * \brief Returns the remaining computation amount of a task #msg_task_t.
  *
  */
  *
  */
-double MSG_task_get_remaining_computation(m_task_t task)
+double MSG_task_get_remaining_computation(msg_task_t task)
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
@@ -352,12 +352,12 @@ double MSG_task_get_remaining_computation(m_task_t task)
 }
 
 /** \ingroup m_task_management
 }
 
 /** \ingroup m_task_management
- * \brief Returns the total amount received by a task #m_task_t.
+ * \brief Returns the total amount received by a task #msg_task_t.
  *        If the communication does not exist it will return 0.
  *        So, if the communication has FINISHED or FAILED it returns
  *        zero.
  */
  *        If the communication does not exist it will return 0.
  *        So, if the communication has FINISHED or FAILED it returns
  *        zero.
  */
-double MSG_task_get_remaining_communication(m_task_t task)
+double MSG_task_get_remaining_communication(msg_task_t task)
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
@@ -371,7 +371,7 @@ double MSG_task_get_remaining_communication(m_task_t task)
  * \brief Return 1 if communication task is limited by latency, 0 otherwise
  *
  */
  * \brief Return 1 if communication task is limited by latency, 0 otherwise
  *
  */
-int MSG_task_is_latency_bounded(m_task_t task)
+int MSG_task_is_latency_bounded(msg_task_t task)
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
@@ -382,10 +382,10 @@ int MSG_task_is_latency_bounded(m_task_t task)
 #endif
 
 /** \ingroup m_task_management
 #endif
 
 /** \ingroup m_task_management
- * \brief Returns the size of the data attached to a task #m_task_t.
+ * \brief Returns the size of the data attached to a task #msg_task_t.
  *
  */
  *
  */
-double MSG_task_get_data_size(m_task_t task)
+double MSG_task_get_data_size(msg_task_t task)
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
@@ -401,7 +401,7 @@ double MSG_task_get_data_size(m_task_t task)
  *        cpu power than the other ones.
  *
  */
  *        cpu power than the other ones.
  *
  */
-void MSG_task_set_priority(m_task_t task, double priority)
+void MSG_task_set_priority(msg_task_t task, double priority)
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
index 705e9dc..938f959 100644 (file)
@@ -23,7 +23,7 @@ static int send(int argc, char *argv[])
 static int receive(int argc, char *argv[])
 {
   XBT_INFO("Receiving");
 static int receive(int argc, char *argv[])
 {
   XBT_INFO("Receiving");
-  m_task_t task = NULL;
+  msg_task_t task = NULL;
   MSG_task_receive_with_timeout(&task, MSG_host_get_name(MSG_host_self()), DBL_MAX);
   xbt_assert(MSG_task_get_sender(task), "No sender received");
   XBT_INFO("Got a message sent by '%s'",
   MSG_task_receive_with_timeout(&task, MSG_host_get_name(MSG_host_self()), DBL_MAX);
   xbt_assert(MSG_task_get_sender(task), "No sender received");
   XBT_INFO("Got a message sent by '%s'",
index 396dda2..d4745a2 100644 (file)
@@ -18,7 +18,7 @@ int test_trace(int argc, char *argv[]);
 /** test the trace integration cpu model */
 int test_trace(int argc, char *argv[])
 {
 /** test the trace integration cpu model */
 int test_trace(int argc, char *argv[])
 {
-  m_task_t task;
+  msg_task_t task;
   double task_comp_size = 2800;
   double task_prio = 1.0;
 
   double task_comp_size = 2800;
   double task_prio = 1.0;