+/** just like an assert.
+ * This function is used to ensure that a condition is true.
+ * If not, it prints an error message (with the virtual date and the
+ * PID of the #m_process_t that called it).
+ */
+static void ASSERT(int value, const char *fmt, ...)
+{
+ m_process_t self = MSG_process_self();
+ va_list ap;
+
+ if(!value) {
+ va_start(ap, fmt);
+ if (self)
+ fprintf(stderr, "[%g] P%d | ", MSG_getClock(),
+ MSG_process_get_PID(self));
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ xbt_abort();
+ }
+ return;
+}
+
+/** Die
+ * Just like #ASSERT() except you already know that the condition does not hold
+ * true.
+ */