diff --git a/include/rtthread.h b/include/rtthread.h index a72b00a3e7..4c23e43e2a 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -717,6 +717,9 @@ if (!(EX)) \ { \ rt_assert_handler(#EX, __FUNCTION__, __LINE__); \ } +#else +#define RT_ASSERT(EX) +#endif /* RT_USING_DEBUG */ #ifdef RT_DEBUGING_CONTEXT /* Macro to check current context */ @@ -791,9 +794,6 @@ while (0) #define RT_DEBUG_IN_THREAD_CONTEXT #define RT_DEBUG_SCHEDULER_AVAILABLE(need_check) #endif /* RT_DEBUGING_CONTEXT */ -#else -#define RT_ASSERT(EX) -#endif /* RT_USING_DEBUG */ /**@}*/