}
}
+/**
+ * \brief Set the kill time of a process.
+ *
+ * \param process a process
+ * \param kill_time a double
+ */
+void simcall_process_set_kill_time(smx_process_t process, double kill_time)
+{
+
+ if (kill_time > SIMIX_get_clock()) {
+ if (simix_global->kill_process_function) {
+ XBT_DEBUG("Set kill time %f for process %s(%s)",kill_time, process->name,
+ process->smx_host->name);
+ SIMIX_timer_set(kill_time, simix_global->kill_process_function, process);
+ }
+ }
+}
+
/**
* \brief Return the location on which an agent is running.
*
void simcall_comm_send(smx_rdv_t rdv, double task_size, double rate,
void *src_buff, size_t src_buff_size,
- int (*match_fun)(void *, void *), void *data,
+ int (*match_fun)(void *, void *, smx_action_t), void *data,
double timeout)
{
/* checking for infinite values */
smx_action_t simcall_comm_isend(smx_rdv_t rdv, double task_size, double rate,
void *src_buff, size_t src_buff_size,
- int (*match_fun)(void *, void *),
+ int (*match_fun)(void *, void *, smx_action_t),
void (*clean_fun)(void *),
void *data,
int detached)
}
void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
- int (*match_fun)(void *, void *), void *data, double timeout)
+ int (*match_fun)(void *, void *, smx_action_t), void *data, double timeout)
{
xbt_assert(isfinite(timeout), "timeout is not finite!");
xbt_assert(rdv, "No rendez-vous point defined for recv");
}
smx_action_t simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
- int (*match_fun)(void *, void *), void *data)
+ int (*match_fun)(void *, void *, smx_action_t), void *data)
{
xbt_assert(rdv, "No rendez-vous point defined for irecv");