*
* \return Return the clock.
*/
-double SIMIX_get_clock(void)
+XBT_INLINE double SIMIX_get_clock(void)
{
return surf_get_clock();
}
*
* Must be called before the first call to SIMIX_solve()
*/
-void SIMIX_init(void)
+XBT_INLINE void SIMIX_init(void)
{
surf_presolve();
}
while ((action = xbt_swag_extract(model->states.failed_action_set))) {
smx_action = action->data;
if (smx_action) {
- xbt_fifo_unshift(actions_failed, smx_action);
+ SIMIX_action_signal_all(smx_action);
}
}
while ((action = xbt_swag_extract(model->states.done_action_set))) {
smx_action = action->data;
if (smx_action) {
- xbt_fifo_unshift(actions_done, smx_action);
+ /* Copy the transfered data of the completed communication actions */
+ /* FIXME: find a better way to determine if its a comm action */
+ if(smx_action->data != NULL)
+ SIMIX_network_copy_data((smx_comm_t)smx_action->data);
+ SIMIX_action_signal_all(smx_action);
}
}
}
* \param arg Parameters of the function
*
*/
-void SIMIX_timer_set(double date, void *function, void *arg)
+XBT_INLINE void SIMIX_timer_set(double date, void *function, void *arg)
{
surf_timer_model->extension.timer.set(date, function, arg);
}
-int SIMIX_timer_get(void **function, void **arg)
+XBT_INLINE int SIMIX_timer_get(void **function, void **arg)
{
return surf_timer_model->extension.timer.get(function, arg);
}
* \param function Create process function
*
*/
-void SIMIX_function_register_process_create(smx_creation_func_t function)
+XBT_INLINE void SIMIX_function_register_process_create(smx_creation_func_t function)
{
xbt_assert0((simix_global->create_process_function == NULL),
"Data already set");
* \param function Kill process function
*
*/
-void SIMIX_function_register_process_kill(void_f_pvoid_t function)
+XBT_INLINE void SIMIX_function_register_process_kill(void_f_pvoid_t function)
{
xbt_assert0((simix_global->kill_process_function == NULL),
"Data already set");
* \param function cleanup process function
*
*/
-void SIMIX_function_register_process_cleanup(void_f_pvoid_t function)
+XBT_INLINE void SIMIX_function_register_process_cleanup(void_f_pvoid_t function)
{
simix_global->cleanup_process_function = function;
}