Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simix: change two more getter simcalls into methods
[simgrid.git] / src / msg / msg_task.cpp
index 95382ab..4910856 100644 (file)
@@ -252,7 +252,7 @@ msg_error_t MSG_task_cancel(msg_task_t task)
  */
 double MSG_task_get_flops_amount(msg_task_t task) {
   if (task->simdata->compute) {
-    return simcall_execution_get_remains(task->simdata->compute);
+    return task->simdata->compute->remains();
   } else {
     return task->simdata->flops_amount;
   }
@@ -287,9 +287,8 @@ void MSG_task_set_bytes_amount(msg_task_t task, double data_size)
  */
 double MSG_task_get_remaining_communication(msg_task_t task)
 {
-  xbt_assert((task != NULL) && (task->simdata != NULL), "Invalid parameter");
   XBT_DEBUG("calling simcall_communication_get_remains(%p)", task->simdata->comm);
-  return simcall_comm_get_remains(task->simdata->comm);
+  return task->simdata->comm->remains();
 }
 
 /** \ingroup m_task_management
@@ -390,8 +389,8 @@ void MSG_task_set_affinity(msg_task_t task, msg_host_t host, unsigned long mask)
   }
 
   {
-    smx_synchro_t compute = task->simdata->compute;
-    msg_host_t host_now = compute->execution.host;  // simix_private.h is necessary
+    simgrid::simix::Exec *compute = task->simdata->compute;
+    msg_host_t host_now = compute->host;  // simix_private.h is necessary
     if (host_now != host) {
       /* task is not yet executed on this host */
       XBT_INFO("set affinity(0x%04lx@%s) for %s (not active now)", mask, MSG_host_get_name(host),