Browse Source

STARPU_ABORT: print a message to stderr and abort rather than calling assert(0).

Assertions may be disabled by defining NDEBUG, and we __really__ want STARPU_ABORT() to abort, no matter what.
Cyril Roelandt 13 years ago
parent
commit
f679fffa5a
1 changed files with 4 additions and 1 deletions
  1. 4 1
      include/starpu_util.h

+ 4 - 1
include/starpu_util.h

@@ -48,7 +48,10 @@ extern "C"
 #  endif
 #endif
 
-#define STARPU_ABORT()		assert(0)
+#define STARPU_ABORT() do {                                          \
+	fprintf(stderr, "%s:%d %s\n", __FILE__, __LINE__, __func__); \
+	abort();                                                     \
+} while(0)
 
 #if defined(STARPU_HAVE_STRERROR_R)
 #  define STARPU_CHECK_RETURN_VALUE(err, message) {if (err < 0) { \