From d24e6800f188ab376b4d8b7d91b0cec1c3d8a364 Mon Sep 17 00:00:00 2001 From: ChenHengming Date: Thu, 2 Jun 2016 10:08:19 +0000 Subject: [PATCH] [mpp_log]: use dynamic abort to replace static compiled mpp_abort git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@864 6e48237b-75ef-9749-8fc9-41990f28c85a --- osal/inc/mpp_log.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/osal/inc/mpp_log.h b/osal/inc/mpp_log.h index 49c23cb8..40a8e27e 100644 --- a/osal/inc/mpp_log.h +++ b/osal/inc/mpp_log.h @@ -54,6 +54,7 @@ #define MPP_TIMING (0x00000001) +#define MPP_ABORT (0x10000000) /* * mpp_dbg usage: @@ -86,12 +87,11 @@ * 24~31 bit: information print format */ -#ifdef __DEBUG -#define mpp_abort() abort() -#else -#define mpp_abort() -#endif - +#define mpp_abort() do { \ + if (mpp_debug & MPP_ABORT) { \ + abort(); \ + } \ +} while (0) #define MPP_STRINGS(x) MPP_TO_STRING(x) #define MPP_TO_STRING(x) #x