/********************************* SIMIX **************************************/
+XBT_INLINE double SIMIX_timer_next(void)
+{
+ return xbt_heap_size(simix_timers) > 0 ? xbt_heap_maxkey(simix_timers) : -1.0;
+}
+
/**
* \brief Initialize SIMIX internal data.
*
xbt_heap_push(simix_timers, timer, date);
}
-XBT_INLINE double SIMIX_timer_next(void)
-{
- return xbt_heap_size(simix_timers) > 0 ? xbt_heap_maxkey(simix_timers) : -1.0;
-}
-
/**
* \brief Registers a function to create a process.
*
static unsigned long simix_process_count = 0;
+/**
+ * \brief Returns the current agent.
+ *
+ * This functions returns the currently running SIMIX process.
+ *
+ * \return The SIMIX process
+ */
+XBT_INLINE smx_process_t SIMIX_process_self(void)
+{
+ if(simix_global)
+ return SIMIX_context_self();
+ return NULL;
+}
+
/**
* \brief Move a process to the list of processes to destroy.
*/
surf_workstation_model->resume(action->sleep.surf_sleep);
}
-/**
- * \brief Returns the current agent.
- *
- * This functions returns the currently running SIMIX process.
- *
- * \return The SIMIX process
- */
-XBT_INLINE smx_process_t SIMIX_process_self(void)
-{
- if(simix_global)
- return SIMIX_context_self();
- return NULL;
-}
-
/**
* Calling this function makes the process to yield.
* Only the processes can call this function, giving back the control to maestro