* \brief Sets the user data associated to a host.
*
* The host must not have previous user data associated to it.
- * \param A host SIMIX host
+ * \param host A SIMIX host
* \param data The user data to set
*/
void simcall_host_set_data(smx_host_t host, void *data)
*
* \param name Name of the execution action to create
* \param host SIMIX host where the action will be executed
- * \param amount Computation amount (in bytes)
+ * \param computation_amount amount Computation amount (in bytes)
+ * \param priority computation priority
* \return A new SIMIX execution action
*/
smx_action_t simcall_host_execute(const char *name, smx_host_t host,
* \brief Destroys an execution action.
*
* Destroys an action, freing its memory. This function cannot be called if there are a conditional waiting for it.
- * \param action The execution action to destroy
+ * \param execution The execution action to destroy
*/
void simcall_host_execution_destroy(smx_action_t execution)
{
* \brief Cancels an execution action.
*
* This functions stops the execution. It calls a surf function.
- * \param action The execution action to cancel
+ * \param execution The execution action to cancel
*/
void simcall_host_execution_cancel(smx_action_t execution)
{
* \ingroup simix_host_management
* \brief Returns how much of an execution action remains to be done.
*
- * \param Action The execution action
+ * \param execution The execution action
* \return The remaining amount
*/
double simcall_host_execution_get_remains(smx_action_t execution)
* \param argc first argument passed to \a code
* \param argv second argument passed to \a code
* \param properties the properties of the process
+ * \param auto_restart either it is autorestarting or not.
*/
void simcall_process_create(smx_process_t *process, const char *name,
xbt_main_func_t code,
* This function changes the value of the host on which \a process is running.
*
* \param process the process to migrate
- * \param source name of the previous host
* \param dest name of the new host
*/
void simcall_process_change_host(smx_process_t process, smx_host_t dest)
* \ingroup simix_process_management
* \brief Set the user data of a #smx_process_t.
*
- * This functions checks whether \a process is a valid pointer or not and set the user data associated to \a process if it is possible.
+ * This functions sets the user data associated to \a process.
* \param process SIMIX process
* \param data User data
*/
* \ingroup simix_process_management
* \brief Return the location on which an agent is running.
*
- * This functions checks whether \a process is a valid pointer or not and return the m_host_t corresponding to the location on which \a process is running.
+ * This functions returns the smx_host_t corresponding to the location on which
+ * \a process is running.
* \param process SIMIX process
* \return SIMIX host
*/
/**
* \ingroup simix_process_management
- * \ingroup m_process_management
* \brief Return the properties
*
* This functions returns the properties associated with this process
* \brief Add an on_exit function
* Add an on_exit function which will be executed when the process exits/is killed.
*/
-XBT_PUBLIC(void) simcall_process_on_exit(smx_process_t process, int_f_pvoid_t fun, void *data) {
+XBT_PUBLIC(void) simcall_process_on_exit(smx_process_t process, int_f_pvoid_t fun, void *data)
+{
smx_simcall_t simcall = SIMIX_simcall_mine();
simcall->call = SIMCALL_PROCESS_ON_EXIT;
* Will restart the process when the host comes back up if auto_restart is set to 1.
*/
-XBT_PUBLIC(void) simcall_process_auto_restart_set(smx_process_t process, int auto_restart) {
+XBT_PUBLIC(void) simcall_process_auto_restart_set(smx_process_t process, int auto_restart)
+{
smx_simcall_t simcall = SIMIX_simcall_mine();
simcall->call = SIMCALL_PROCESS_AUTO_RESTART_SET;
SIMIX_simcall_push(simcall->issuer);
}
+/**
+ * \ingroup simix_process_management
+ * \brief Restarts the process, killing it and starting it again from scratch.
+ */
+XBT_PUBLIC(void) simcall_process_restart(smx_process_t process)
+{
+ smx_simcall_t simcall = SIMIX_simcall_mine();
+
+ simcall->call = SIMCALL_PROCESS_RESTART;
+ simcall->process_restart.process = process;
+
+ SIMIX_simcall_push(simcall->issuer);
+}
/**
* \ingroup simix_process_management
* \brief Creates a new sleep SIMIX action.
/**
* \ingroup simix_rdv_management
* \brief Destroy a rendez-vous point
- * \param name The rendez-vous point to destroy
+ * \param rdv The rendez-vous point to destroy
*/
void simcall_rdv_destroy(smx_rdv_t rdv)
{
}
/**
* \ingroup simix_comm_management
- *
*/
void simcall_comm_send(smx_rdv_t rdv, double task_size, double rate,
void *src_buff, size_t src_buff_size,
}
/**
* \ingroup simix_file_management
- *
+ * \brief
*/
smx_file_t simcall_file_open(const char* mount, const char* path, const char* mode)
{