+unsigned long simix_process_maxpid = 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)
+{
+ smx_context_t self_context = SIMIX_context_self();
+
+ return self_context ? SIMIX_context_get_data(self_context) : NULL;
+}