3 /* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
13 #include "msg/datatypes.h"
14 #include "xbt/error.h"
16 static void ASSERT(int value, const char *fmt, ...)
18 m_process_t self = MSG_process_self();
24 fprintf(stderr, "[%Lg] P%d | ", MSG_getClock(),
25 MSG_process_get_PID(self));
26 vfprintf(stderr, fmt, ap);
34 static void DIE(const char *fmt, ...)
36 m_process_t self = MSG_process_self();
41 fprintf(stderr, "[%Lg] P%d | ", MSG_getClock(),
42 MSG_process_get_PID(self));
43 vfprintf(stderr, fmt, ap);
50 static void PRINT_MESSAGE(const char *fmt, ...)
53 m_process_t self = MSG_process_self();
58 fprintf(stderr, "[%Lg] P%d | (%s:%s) ", MSG_getClock(),
59 MSG_process_get_PID(self), MSG_host_self()->name, self->name);
60 vfprintf(stderr, fmt, ap);
66 static void PRINT_DEBUG_MESSAGE(const char *fmt, ...)
69 m_process_t self = MSG_process_self();
74 fprintf(stderr, "DEBUG [%Lg] P%d | (%s) ", MSG_getClock(),
75 MSG_process_get_PID(self), MSG_host_self()->name);
76 vfprintf(stderr, fmt, ap);