浏览代码

include/starpu_util.h: new macro STARPU_ABORT_MSG

Nathalie Furmento 12 年之前
父节点
当前提交
a5f1ba9004
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      include/starpu_util.h

+ 6 - 1
include/starpu_util.h

@@ -82,7 +82,12 @@ extern "C"
 #endif
 
 #define STARPU_ABORT() do {                                          \
-	fprintf(stderr, "[starpu][abort] %s:%d %s\n", __FILE__, __LINE__, __starpu_func__); \
+	fprintf(stderr, "[starpu][abort][%s@%s:%d]\n", __starpu_func__, __FILE__, __LINE__); \
+	abort();                                                     \
+} while(0)
+
+#define STARPU_ABORT_MSG(msg, ...) do {					\
+	fprintf(stderr, "[starpu][abort][%s@%s:%d] " msg "\n", __starpu_func__, __FILE__, __LINE__, ## __VA_ARGS__); \
 	abort();                                                     \
 } while(0)