From e2c031643c8dec7c9ea1581216e19bf19c8f73f0 Mon Sep 17 00:00:00 2001 From: Shicheng Chu <1468559561@qq.com> Date: Thu, 29 Jun 2023 23:24:25 +0800 Subject: [include][dbg]update: no longer use RT_DEBUG_LOG in rtdebug.h (#7750) --- include/rtdebug.h | 54 ------------------------------------------------------ include/rtdef.h | 4 ++-- 2 files changed, 2 insertions(+), 56 deletions(-) (limited to 'include') diff --git a/include/rtdebug.h b/include/rtdebug.h index 76a9779a57..0246ad0fa5 100644 --- a/include/rtdebug.h +++ b/include/rtdebug.h @@ -15,64 +15,11 @@ /* Using this macro to control all kernel debug features. */ #ifdef RT_DEBUG -/* Turn on some of these (set to non-zero) to debug kernel */ -#ifndef RT_DEBUG_MEM -#define RT_DEBUG_MEM 0 -#endif - -#ifndef RT_DEBUG_MEMHEAP -#define RT_DEBUG_MEMHEAP 0 -#endif - -#ifndef RT_DEBUG_MODULE -#define RT_DEBUG_MODULE 0 -#endif - -#ifndef RT_DEBUG_SCHEDULER -#define RT_DEBUG_SCHEDULER 0 -#endif - -#ifndef RT_DEBUG_SLAB -#define RT_DEBUG_SLAB 0 -#endif - -#ifndef RT_DEBUG_THREAD -#define RT_DEBUG_THREAD 0 -#endif - -#ifndef RT_DEBUG_TIMER -#define RT_DEBUG_TIMER 0 -#endif - -#ifndef RT_DEBUG_IRQ -#define RT_DEBUG_IRQ 0 -#endif - -#ifndef RT_DEBUG_IPC -#define RT_DEBUG_IPC 0 -#endif - -#ifndef RT_DEBUG_DEVICE -#define RT_DEBUG_DEVICE 1 -#endif - -#ifndef RT_DEBUG_INIT -#define RT_DEBUG_INIT 0 -#endif - /* Turn on this to enable context check */ #ifndef RT_DEBUG_CONTEXT_CHECK #define RT_DEBUG_CONTEXT_CHECK 1 #endif -#define RT_DEBUG_LOG(type, message) \ -do \ -{ \ - if (type) \ - rt_kprintf message; \ -} \ -while (0) - #define RT_ASSERT(EX) \ if (!(EX)) \ { \ @@ -156,7 +103,6 @@ while (0) #else /* RT_DEBUG */ #define RT_ASSERT(EX) -#define RT_DEBUG_LOG(type, message) #define RT_DEBUG_NOT_IN_INTERRUPT #define RT_DEBUG_IN_THREAD_CONTEXT #define RT_DEBUG_SCHEDULER_AVAILABLE(need_check) diff --git a/include/rtdef.h b/include/rtdef.h index 1f0610cbcd..39441a2dcf 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -270,7 +270,7 @@ typedef __gnuc_va_list va_list; typedef int (*init_fn_t)(void); #ifdef _MSC_VER #pragma section("rti_fn$f",read) - #if RT_DEBUG_INIT + #ifdef RT_DEBUG_INIT struct rt_init_desc { const char* level; @@ -296,7 +296,7 @@ typedef int (*init_fn_t)(void); {__rti_level_##fn, fn }; #endif #else - #if RT_DEBUG_INIT + #ifdef RT_DEBUG_INIT struct rt_init_desc { const char* fn_name; -- cgit v1.3.1