From ced8fe0ca0ee4c3ea313ae3eda53bb6cf2e531d0 Mon Sep 17 00:00:00 2001 From: ChenHengming Date: Mon, 14 Sep 2015 21:50:46 +0000 Subject: [PATCH] [mpp_log]: add mpp_abort on debug mode git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@269 6e48237b-75ef-9749-8fc9-41990f28c85a --- osal/inc/mpp_log.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/osal/inc/mpp_log.h b/osal/inc/mpp_log.h index 6185a020..035a4009 100644 --- a/osal/inc/mpp_log.h +++ b/osal/inc/mpp_log.h @@ -75,6 +75,12 @@ extern RK_U32 mpp_debug; * 24~31 bit: information print format */ +#ifdef __DEBUG +#define mpp_abort() abort() +#else +#define mpp_abort() +#endif + #define MPP_STRINGS(x) MPP_TO_STRING(x) #define MPP_TO_STRING(x) #x @@ -82,7 +88,7 @@ extern RK_U32 mpp_debug; if (!(cond)) { \ mpp_err("Assertion %s failed at %s:%d\n", \ MPP_STRINGS(cond), __FILE__, __LINE__); \ - abort(); \ + mpp_abort(); \ } \ } while (0) @@ -102,5 +108,4 @@ void __mpp_dbg(RK_U32 debug, RK_U32 flag, const char *tag, const char *fmt, cons } #endif - #endif /*__MPP_LOG_H__*/