Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further cleaning in simcalls
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 3 Feb 2019 17:08:36 +0000 (18:08 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 3 Feb 2019 17:08:36 +0000 (18:08 +0100)
include/simgrid/simix.h
src/msg/msg_task.cpp
src/simix/libsmx.cpp

index 748f4a5..b75e5a8 100644 (file)
@@ -196,7 +196,6 @@ XBT_ATTRIB_DEPRECATED_v324("Please use ActorImpl::throw_exception") XBT_PUBLIC
 XBT_PUBLIC void simcall_process_suspend(smx_actor_t process);
 
 /* Getters and Setters */
 XBT_PUBLIC void simcall_process_suspend(smx_actor_t process);
 
 /* Getters and Setters */
-XBT_PUBLIC void simcall_process_set_data(smx_actor_t process, void* data);
 XBT_PUBLIC void simcall_process_set_kill_time(smx_actor_t process, double kill_time);
 XBT_PUBLIC void simcall_process_join(smx_actor_t process, double timeout);
 /* Sleep control */
 XBT_PUBLIC void simcall_process_set_kill_time(smx_actor_t process, double kill_time);
 XBT_PUBLIC void simcall_process_join(smx_actor_t process, double timeout);
 /* Sleep control */
@@ -233,7 +232,6 @@ XBT_PUBLIC smx_activity_t simcall_comm_iprobe(smx_mailbox_t mbox, int type,
                                               int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
                                               void* data);
 #endif
                                               int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
                                               void* data);
 #endif
-XBT_PUBLIC void simcall_comm_cancel(smx_activity_t comm);
 
 /* FIXME: waitany is going to be a vararg function, and should take a timeout */
 XBT_PUBLIC unsigned int simcall_comm_waitany(xbt_dynar_t comms, double timeout);
 
 /* FIXME: waitany is going to be a vararg function, and should take a timeout */
 XBT_PUBLIC unsigned int simcall_comm_waitany(xbt_dynar_t comms, double timeout);
index bf8de7e..d7fbc11 100644 (file)
@@ -189,7 +189,7 @@ msg_error_t MSG_task_cancel(msg_task_t task)
   if (simdata->compute) {
     simgrid::simix::simcall([simdata] { simdata->compute->cancel(); });
   } else if (simdata->comm) {
   if (simdata->compute) {
     simgrid::simix::simcall([simdata] { simdata->compute->cancel(); });
   } else if (simdata->comm) {
-    simcall_comm_cancel(simdata->comm);
+    simgrid::simix::simcall([simdata] { simdata->comm->cancel(); });
   }
   simdata->setNotUsed();
   return MSG_OK;
   }
   simdata->setNotUsed();
   return MSG_OK;
index 8bcf662..326c501 100644 (file)
@@ -93,19 +93,6 @@ void simcall_process_suspend(smx_actor_t process)
   simcall_BODY_process_suspend(process);
 }
 
   simcall_BODY_process_suspend(process);
 }
 
-/**
- * @ingroup simix_process_management
- * @brief Set the user data of a #smx_actor_t.
- *
- * This functions sets the user data associated to @a process.
- * @param process SIMIX process
- * @param data User data
- */
-void simcall_process_set_data(smx_actor_t process, void *data)
-{
-  simgrid::simix::simcall([process, data] { process->set_user_data(data); });
-}
-
 /**
  * @ingroup simix_process_management
  * @brief Set the kill time of a process.
 /**
  * @ingroup simix_process_management
  * @brief Set the kill time of a process.
@@ -235,18 +222,6 @@ smx_activity_t simcall_comm_iprobe(smx_mailbox_t mbox, int type,
   return simcall_BODY_comm_iprobe(mbox, type, match_fun, data);
 }
 
   return simcall_BODY_comm_iprobe(mbox, type, match_fun, data);
 }
 
-/**
- * @ingroup simix_comm_management
- */
-void simcall_comm_cancel(smx_activity_t synchro)
-{
-  simgrid::simix::simcall([synchro] {
-    simgrid::kernel::activity::CommImplPtr comm =
-        boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(synchro);
-    comm->cancel();
-  });
-}
-
 /**
  * @ingroup simix_comm_management
  */
 /**
  * @ingroup simix_comm_management
  */